Below code does not work. It prints the rectange out side of na list item
QDeclarativeView *qmlListViewName = new QDeclarativeView(this);
qmlListViewName->rootContext()->setContextProperty("name", name);
qmlListViewName
->setSource
(QUrl("qrc:/qml/ListViewName.qml"));
QDeclarativeView *qmlListViewName = new QDeclarativeView(this);
qmlListViewName->rootContext()->setContextProperty("name", name);
qmlListViewName->setSource(QUrl("qrc:/qml/ListViewName.qml"));
To copy to clipboard, switch view to plain text mode
setIndexWidget(nameItem->index(),qmlListViewName);
setIndexWidget(nameItem->index(),qmlListViewName);
To copy to clipboard, switch view to plain text mode
import QtQuick 1.0
Rectangle {
width: 100
height: 62
color: "yellow"
Text {
id: fileName
anchors.centerIn: parent
text: name
}
}
import QtQuick 1.0
Rectangle {
width: 100
height: 62
color: "yellow"
Text {
id: fileName
anchors.centerIn: parent
text: name
}
}
To copy to clipboard, switch view to plain text mode
When I remove [this] from new QDeclarativeView(this); -> new QDeclarativeView;
It does not do anything.
Any ideas why ?
Bookmarks