Questions tagged [qqmlengine]

26 questions
0
votes
1 answer

QT/QML application crashes due to object ownership issue

I have a Qt/Qml application which uses a static Qt C++ library. The classes (models etc.) reside in the library whose objects are created in the application's main.cpp or QML files. Some of the classes are derived from QObject. I get segmentation…
Shariq
  • 25
  • 2
  • 8
0
votes
0 answers

Binding loop detected for property "foreground"

My application is running very well inside Ubuntu operational system. But when I try to run it inside the Yocto using Boot2Qt it throws the following error message: QML ToolBar (parent or ancestor of Material): Binding loop detected for property…
0
votes
1 answer

Handling with pages in qml

I've just begun to learn Qml.Altought i read too many qt tutorial, still struggling with some problems. I want to make multipages desktop application using OpenGL. First of all, in main function of the program, i am transmitting class instance so…
selman
  • 9
  • 3
0
votes
2 answers

Create QML plugin with CMake

I'm trying to create simple QML C++ plugin using CMake. There are my sources: CMakeLists.txt: cmake_minimum_required(VERSION 2.8.12) project(qmltest LANGUAGES CXX) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) #…
Shadasviar
  • 466
  • 5
  • 15
0
votes
1 answer

QQmlApplicationEngine not completely unloading qml components

I'm currently loading my main.qml using QQmlApplicationEngine and works fine, and then I want to switch to main2.qml (without calling quit() on my QQmlApplicationEngine since that triggers QCoreApplication::exit() which will exit my application).…
blessedone
  • 160
  • 1
  • 8
0
votes
1 answer

How to set a QML instantiated item as a QImageProvider

I have a class that inherits QQuickItem and QQuickImageProvider. This class is instantiated from qml. I need to call QQmlEngine::addImageProvider so that this class can actually provide images. I should be able to get the engine that my object…
DJMcMayhem
  • 7,285
  • 4
  • 41
  • 61
0
votes
0 answers

instantiate c++ struct in qml js functions

how can initial an object from a c++ struct and send them to c++ class like this : //c++ struct sRange { float min; float max; }; qmlRegisterType("sRange", 0, 1, "sRange"); //QML import sRange 0.1 function newRange() { sRange range; …
SajadBlog
  • 514
  • 2
  • 12
0
votes
1 answer

Render a QQuickItem on a second window without changing its parent hierarchy

I have to render a QQuickItem owned by a particular window, into another. Basically MyQQuickItem owned by window1 to be rendered on window2. This switch has to happen in my app repeatedly due to a certain functionality. I do the following to achieve…
TheWaterProgrammer
  • 7,055
  • 12
  • 70
  • 159
-1
votes
1 answer

Dynamically load QQuickWindow instead of QQuickWidget in Qt C++ unit test

In our project we have C++ unit tests for QML sources. It uses following code to load component dynamically for further processing class MyTest { ... QScopedPointer quickWidget; QQuickItem* root = nullptr; void…
Aleksey Kontsevich
  • 4,671
  • 4
  • 46
  • 101
-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
-2
votes
2 answers

QML function invoked from C++ not able to update element

I am invoking a QML function from C++. Issue is the QML function cannot update a QML element when invoked from C++. below is code: In main.qml: import QtQuick 2.0 function myQmlFunction(msg) { console.log("Got message:", msg) textbox.text =…
Sparkskie
  • 1
  • 1
1
2