Relative Content

Tag Archive for c++qtqml

The Label for representing QML Timer is getting freeze and jumps for couple of seconds after performing some activity in application

I am using a QML Timer in my application. The value of this timer is assigned to QML text. This text is displayed on the application. Now this timer starts as soon as user clicks on Ok button after entering the credentials. Now in the application when i load an image, the text indicating the timer freezes until the image is fully loaded. Once the image is fully loaded, then the timer starts running, however it doesn’t starts from the time where it had stop. It rather jumps a couple of seconds and from there it starts. how to resolve this?

Qt Connections issue

So there is a View class.
It has a signal ” void authstatuschanged(int hr, QString status, int modelno);”.
There are two QML files : LoginPanel.qml and MainScreen.qml.
In both the qml files there were signal handlers.
The code for LoginPanel.qml signal handler is this :

Showing C++ objects on a QML scene

Changing a QGraphicsScene / QGraphicsItem collection to use QML… I am recreating the items in the backend, and trying to place them in a Repeater on the QML frontend.

QQmlOpenMetaObject breaks polymorphism

My question is, does it possible to employ QQmlOpenMetaObject in the class and have method overloads of the class methods? I probably somehow used QQmlOpenMetaObject incorrectly or something but there is not much information about it anyway cause of private API, but I would really appreciate if someone could help me to figure out what is the problem in here.
Also I created git repo if someone wants to build the example and play with it.

Custom C++ type from a QML module is not defined when used inside QML file

In my project I’m trying to expose a singleton type to QML from C++. Initially I registered it with qmlRegisterSingletonInstance and it worked fine. But when I tried to replace this way with QML_ELEMENT and QML_SINGLETON macros it compiles fine but when QML tries to use the class it complains that the type is not defined.