Item { x: 10.5 // a 'real' property state: "details" // a 'string' property focus: true // a 'bool' property ...
Item { x: 10.5 // a 'real' property state: "details" // a 'string' property focus: true // a 'bool' property ...
Item { x: 10.5 // a 'real' property state: "details" // a 'string' property focus: true // a 'bool' property ...
// main.cpp
#include
#include
#include
int main(int argc, char *argv[]) {
QApplication app(argc, argv);
QDeclarativeView view;
QDeclarativeContext *context = view.rootContext();
context->setContextProperty("backgroundColor", QColor(Qt::yellow));
view.setSource(QUrl::fromLocalFile("main.qml"));
view.show();
return app.exec();
}
// main.qml
Rectangle {
width: 300
height: 300
color: backgroundColor
Text {
anchors.centerIn: parent
text: "Hello Yellow World!"
}
}
Если не удалось найти и скачать презентацию, Вы можете заказать его на нашем сайте. Мы постараемся найти нужный Вам материал и отправим по электронной почте. Не стесняйтесь обращаться к нам, если у вас возникли вопросы или пожелания:
Email: Нажмите что бы посмотреть