Guest User

Untitled

a guest
Jun 20th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. QQmlApplicationEngine engine;
  2. engine.load(QUrl(QStringLiteral("qrc:/main.qml"))); //падает при выполнении этой сточки
  3.  
  4. QObject *rootObject = engine.rootObjects().first();
  5. QObject *chat = rootObject->findChild<QObject*>("chat");
  6.  
  7. QVariant text2 = chat->property("text");
  8. qDebug() << chat->setProperty("text", text2.toString() + "ntest");
  9.  
  10. Text {
  11. id: chat
  12. objectName: "chat"
  13. width: 689
  14. height: 378
  15. color: "#cdcccc"
  16. text: qsTr("Dialog started at " + time)
  17. leftPadding: 2
  18. wrapMode: Text.WrapAnywhere
  19. font.pixelSize: 18
  20. }
Add Comment
Please, Sign In to add comment