标题:关于url的问题
作者:lovexin109
日期:2015-10-30 10:56
内容:
想用TABVIEW为下面的每个按钮做不同的图片,在TAB中增加了一个属性string型用来存放背景图片,结果不论是string或者 url 都不行,报错
qrc:/main.qml:77:20: Unable to assign to QUrl
qrc:/main.qml:77:20: Unable to assign to QUrl
qrc:/main.qml:77:20: Unable to assign to QUrl
qrc:/main.qml:77:20: Unable to assign to QUrl
qrc:/main.qml:77:20: Unable to assign to QUrl
TabPlus如下
import QtQuick 2.0
import QtQuick.Controls 1.3
Tab{
property string tabpressed
}
main中如下
import QtQuick 2.4
import[color ..
#1 [toby520 10-30 17:03]
参考 [http://www.heilqt.com/](http://www.heilqt.com/)
#2 回 toby520 的帖子 [lovexin109 10-30 23:49]
toby520:参考 (http://www.heilqt.com/) (2015-10-30 17:03)
谢谢版主,还没找到相关的例子,是在外面不能使用增加的属性吗?我感觉不是类型错了,感觉像是格式不对
#3 回 toby520 的帖子 [lovexin109 11-01 02:51]
toby520:参考 (http://www.heilqt.com/) (2015-10-30 17:03)
styleData根本没那么多属性,自定义的更没有,所以才报这样的错吧