Questions tagged [qqmlengine]
26 questions
5
votes
0 answers
Changing the QQmlContext for a QML object?
Evidently, even when objects are detached from the existing parent and attached to a new one, when the old parent context is destroyed, so is the object.
The first solution that comes to mind is to create the object in a persistent context. However,…

dtech
- 47,916
- 17
- 112
- 190
3
votes
1 answer
How to find out the QQmlEngine instance of a singleton object?
I have a class SingletonBaseClass that is defined in C++ and later extended in QML. In the qmldir file, it is marked as a Singleton:
// qmldir file
singleton SingletonClass 1.0 SingletonClass.qml
// SingletonClass.qml
import QtQml 2.0
pragma…

Richard W
- 631
- 4
- 15
2
votes
1 answer
QtQuick's ListView fails to take ownership of QAbstractItemModel object
Based on Qt documentation, whenever a QObject pointer type is passed from C++ code to QML, via a Q_INVOKABLE method, there is a set of rules that determine who is responsible for the lifetime of that pointer. Should the QObject be parentless,…

Rodrigo Reichert
- 55
- 6
1
vote
0 answers
Opening QWidget inside Qml window
I have a separate qml that I call inside my main window. Inside this qml I want to show the following chart as it is. Is something like this possible? I will be grateful if you could help me. Thanks in advance.
QApplication app(argc,…

Hma
- 9
- 3
1
vote
2 answers
How are QML property dependencies determined? (and how to manipulate them)
A property that is bound to an expression is updated when something in the expression changes.
This is called a dependency.
EDIT:
To clarify:
I'm interested in details on how Qt determines a list of dependencies
Dependencies on simple bindings…

Jack White
- 896
- 5
- 7
1
vote
0 answers
Qt - QQuickView(), setSource without freezing the GUI
being trying to solve issue for a long time, no success, QT version 5.15.0. MinGW 8.1.0, 64 bit
The issue seems to happen only when loading the map plugin in the QML file, below is a snip it of the code
The call…

Gerald
- 23
- 2
1
vote
1 answer
Update a MapCircle on QML using a signal from C++
I'm trying to update a MapCircle in QML from a signal in C++ and I'm veen having several issues with it all day.
In my class I have a Q_PROPERTY which is read only and holds the GPS positions of 4 UAVs in a QVariantList
class GCS: public QObject
{
…

MaskedAfrican
- 196
- 2
- 12
1
vote
1 answer
Qt Quick - How to use a c++ class inheriting from QQuickPaintedItem in a qml interface?
I'm newbie with Qt 5.13.0. In a Visual Studio 2019 project, I need to display a custom painted item inherited from the QQuickPaintedItem class in a qml interface. The custom item is written in a c++ class named WQTMessageItem, which is declared as…

Jean-Milost Reymond
- 1,833
- 1
- 15
- 36
1
vote
2 answers
How to access qabstractlistmodel derived class object as a property of another class from qml?
Iam designing a qml page which consists of 3 lists. I want the data to be displayed in these lists as model from cpp. Can i have all these 3 models as properties from a single class.
I have a class derived from qabstractlistmodel to use as model. I…

igokul95
- 23
- 7
1
vote
1 answer
How to most correctly / efficiently refresh an Item whose source has changed?
I have a loaded qml file from the file system that changes, however since the first time it is loaded it is also cached, it doesn't refresh even if the Loader is "reset" via setting the source component to undefined.
A similar questions has been…

dtech
- 47,916
- 17
- 112
- 190
0
votes
1 answer
QML module is not installed ( QT5.15, Qmake)
I'm facing the issue of "module is not installed" when trying to import a new custom QML module to project. I have tried many solutions from the internet and ChatGPT, but I haven't found any correct answer for my case.
This is my project…

Helen
- 3
- 1
0
votes
0 answers
How to get QQuickWindow from QQmlEngine or QQmlContext?
I have the QQmlEngine and QQmlContext pointer with me. Is it somehow possible to get the QQuickWindow pointer of in the Qt application?

TheWaterProgrammer
- 7,055
- 12
- 70
- 159
0
votes
2 answers
Develop own QQmlExtensionPlugin: module not installed when trying to use in a sample-project
I am trying to create a QQmlExtensionPlugin to use it in another application as a qml-module.
The problem I have is, that when I compile the project and try to use it in a sample-project the qml-compiler says, that the module "Clock 1.0" is not…

Mhouney
- 1
- 3
0
votes
0 answers
Qt 6.4 | QQMLApplicationEngine load() RUN on Debug but dont run on RELEASE
Why qmlEngine.load(url) dont work in init function on RELEASE?
I have function for init class instead default constructor
Why is isnt work?
#include
#include
class window : public QApplication
{
public:
…

Andrey Strokov
- 1
- 3
0
votes
2 answers
Custom view with model and delegate both accessible from both QML files
Although I already figured it out, it took quite a while.
If you know a less convoluted solution - please share.
I'd like to provide a custom View that works with any type of model (with arbitrarily named fields):
model: 3
model: [ "red", "yellow",…

Jack White
- 896
- 5
- 7