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
1 answer

how to attach local folder into qtquick

I need to load images in my qml window. Usually I load it from a resource file which will be deployed along with my .pro file. But since the image folder size is too big the loading time is more. Is there any way by which a local folder can deploy…
Neethu
  • 69
  • 1
  • 11
0
votes
1 answer

QML code and Animations not working as expected

In my QML program I need to use Animations to test for a problem. Please run the code below on your system. I don't know why when I use this ParallelAnimation the ball doesn't reflect when it hits the walls! Here is main.qml: import QtQuick…
opty
  • 27
  • 1
  • 9
0
votes
1 answer

QML performance problems when moving widgets affect each other's movements

Here is a minimal version of a code revealing the problem which is: Moving the racket when playing the game on the Desktop kit (Windows) doesn't affect the speed of ball's movement but when run on an Android device, moving the racket affects the…
opty
  • 27
  • 1
  • 9
0
votes
1 answer

The QML MouseArea property doesn't handle the "target"

We have a project in which there are some components and one of them is named Racket.qml which is as below: import QtQuick 2.9 Rectangle { id: root width: 15; height: 65 property int oldY: y property bool yUwards: false property…
Franky
  • 1,181
  • 2
  • 11
  • 33
0
votes
1 answer

How to display a QImage across landscape & portrait orientations with aspect ratio maintained & not cutting off image data

I have a QIMage that can be in portrait or landscape mode depending upon its width vs height. Or vice versa. I am trying to fit a portrait QIMage in landscape mode & a landscape QImage in portrait mode without breaking the aspect ratio. Following…
TheWaterProgrammer
  • 7,055
  • 12
  • 70
  • 159
0
votes
1 answer

Invoke QML method from C++

I want to invoke a method in MyMap from my class MyBacklogg, how do I do this when I don't have the object parameters in that class? I'm going to receive a string, a QByteArray or a QDataStream in MyBacklogg, depending on which one that works the…
Oliver
  • 59
  • 1
  • 8
0
votes
1 answer

QML access properties of elements in list

I have a list of MapPolyline and I try to save dynamically added objects into this list. well It works but when I try to get the objects in list it does not work. it says TypeError: Cannot read property of undefined Here is my code property…
Majid Hojati
  • 1,740
  • 4
  • 29
  • 61
0
votes
2 answers

Qt component that would take model and display it in grid separated in pages

I want to create a reusable component where I could pass a model i.e. ["red", "green", "blue", "black", "orange", "pink", "gray", "navy", "magenta"] And it would fill Grid with rectangles of model data. And if there are more than let's say 6 items…
Eligijus Pupeikis
  • 1,115
  • 8
  • 19
0
votes
1 answer

How to create a new QQuickItem copy from scratch on C++ side with the same properties as an existing one

I have a QQuickItem fetched from C++ side like this. QQuickItem * my_item = qmlEngine->rootObjects()[0]->findChild("ItemObjectName"); my_item is valid & has all the properties set on to it. Scenario I have 2 windows which need this…
TheWaterProgrammer
  • 7,055
  • 12
  • 70
  • 159
0
votes
1 answer

How create a separate copy of a QQuickItem & render it on a different window

I have a QQuickItem fetched from C++ side like this. QQuickItem * my_item = qmlEngine->rootObjects()[0]->findChild("ItemObjectName"); my_item is valid & has all the properties set on to it. Scenario I have 2 windows which need this…
TheWaterProgrammer
  • 7,055
  • 12
  • 70
  • 159
0
votes
1 answer

How to add a dynamically created QQuickitem to my application's main.qml or the QML list of items

I need to dynamically create a QQuickitem & add to my main.qml. Trying to do it, I create a QQuickitem in the following way. qml_engine->load(QUrl(QStringLiteral("qrc:/qml/main.qml"))); // Creating my QQuickItem here QQuickItem * dynamic_quick_item…
0
votes
1 answer

Create ObjectModel from C++ at runtime

Is it possible to create an ObjectModel from c++ at runtime? I have a plugin based application, where every plugin create a QQmlComponent and setup the signal and slots then give the component to the main app for rendering in a ListView, for this…
Houss_gc
  • 727
  • 5
  • 27
0
votes
2 answers

How can i set a Component property to undefined?

I have a property of type Component. import QtQuick 2.6 Item { id: root property Component sourceComponent /* ........ */ Loader { anchors.fill: parent id: myLoader } SequentialAnimation { id:…
S.M.Mousavi
  • 5,013
  • 7
  • 44
  • 59
0
votes
1 answer

Load a qml component from another qml file dynamically and access that component's qml type properties

I looked into other questions regarding this topic in StackOverflow but it did not help me. I am new to QML/Javascript and I went through QML docs regarding this question but it did not help. Below is one file 'SmallWindow.qml' Item { ... …
User1212
  • 13
  • 6
0
votes
0 answers

QML Components Library

I've been trying to figure out how to create a .dll with only .qml files. To do that i've been looking all over Qt Documentation, nevertheless all my attempts have been unsuccessful. I need a .dll file only, i don't want to make the .qml files to be…
1 2 3
9
10