Questions tagged [qqmlcomponent]

In the Qt framework, the QQmlComponent class encapsulates a QML (Qt Modeling Language) component definition.

In the Qt framework, the QQmlComponent class encapsulates a QML (Qt Modeling Language) component definition.

http://qt-project.org/doc/qt-5/qqmlcomponent.html

149 questions
0
votes
3 answers

Set GridView model property from C++ without setting Context

I'm trying to set the model property of a QML GridView from C++ by calling QQmlProperty::write(gridview, "model", QVariant::fromValue(objlist));. gridview is set correctly, I can modify the property from C++, when I set it to a QList with 6 entries…
yspreen
  • 1,759
  • 2
  • 20
  • 44
0
votes
1 answer

Invalid grouped property access

In this qml code: Component { id: userdelegate PictureBox { ... icon: model.icon icon.heigth: 50 } } PictureBox comes from the PictureBox.qml system file in this way: ... Image { id: icon ... width: parent.width;…
cloc3
  • 21
  • 2
0
votes
1 answer

QML: Signal isn't being called in a unit test

I'm writing a C++ class ScriptProcess, meant to be used in QML, that acts as an interface to a child process. Said child process loads a script, then executes functions on demand. When you call a function, the result (be it a value or an…
JesseTG
  • 2,025
  • 1
  • 24
  • 48
0
votes
1 answer

To access QML component in C++ backend

I have a qml file with Rectangle. I would like to trigger the onClicked( ) from C++ back-end. So, How can I get access of QML component reference in C++/Qt backend?
Ashif
  • 1,652
  • 14
  • 30
0
votes
1 answer

How to outsource qml listview delegate

My delegate grew pretty big. I want to put it in a dedicated file. What do I have to do to make this work? I need clearifications especially on how to import and instantiate the delegate. For future readers a complete howto would be fine.
ManuelSchneid3r
  • 15,850
  • 12
  • 65
  • 103
0
votes
1 answer

Instantiating QML object in existing C++ QT Project

We have an existing QT project written in C++, and we want to add something like the mapViewer example project to our existing UI. We can't figure out how to instantiate the mapViewer, and invoke the method that initializes/displays it. Following…
0
votes
1 answer

MouseArea's parent in the GroupBox

What is the parent of MouseArea, when it in the GroupBox? parent refers to some container: GroupBox { width: 100; height: 100 id: rec MouseArea { anchors.fill: parent acceptedButtons: Qt.LeftButton | Qt.RightButton …
Ivan Kush
  • 2,958
  • 2
  • 23
  • 39
0
votes
2 answers

New qml object added to scene in c++

I have a problem with adding new QML object to existing scene. My main.qml source: ApplicationWindow { id:background visible: true width: 640 height: 480 } MyItem.qml source: Rectangle { width: 100 height: 62 color: "red" anchors.centerIn:…
hus
  • 117
  • 1
  • 7
-1
votes
1 answer

Instantiate a c++ class in FileDialog (QtQuick Object), report error: Cannot assign object to property

Codes: //main.qml import im.sniper.DgConfigFileHandler 1.0 import QtQuick.Dialogs 1.2 ... FileDialog{ id: fileDlg DgConfigFileHandler {id: dgCfgFileHandler2} } I complie codes well and run, then get errors like: QML debugging is enabled.…
Crawl.W
  • 403
  • 5
  • 17
-1
votes
1 answer

Hour format in QML

I am using below statement to display time. Qt.formatTime(new Date(),"hh:mm:AP") Is it possible to display time in 24 hour Format. If so how to do that?
jay
  • 37
  • 2
  • 8
-1
votes
1 answer

How to use mouseclick area from loaded Form in qml?

below is my code snippet where i'm loading qml ui using dynamic object creation method now i have to implement mousearea which reside in loaded file, can anyone help me to do this Qt.createQmlObject(" import QtQuick 2.0 Loader { id:…
jay
  • 37
  • 2
  • 8
-1
votes
1 answer

QMLComponent not ready in deployed app

I'm using Qt 5.5 to create a small app. In the app, I'm manually creating a component like so: QQmlComponent component(engine, QUrl("qrc:/Box.qml")); assert(component.isReady()); My .qrc file IS included in the .pro file like so: RESOURCES +=…
bitwise
  • 541
  • 6
  • 16
-2
votes
1 answer

Is there any alternative of loader in qml?

Actually some of function of my program stopped when I use asynchronous keyword in loader so is there any alternative of loader or asynchronous in qml?
Aman Kumar
  • 11
  • 3
-3
votes
1 answer

How to launch .exe file from qml?

Hello everyone i have to implement MVC based app. How to load sparate exe file on QML form.
1 2 3
9
10