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
30
votes
2 answers

QML: Component vs Item as a container

What is the difference between Component and Item in QML ? The documentation is not absolutely clear here. What is the preferred type to use as a container for several widgets? Can it be replacable by Rectangle? For example, what is the difference…
Dmitry
  • 1,912
  • 2
  • 18
  • 29
13
votes
7 answers

QQmlApplicationEngine failed to load component : "Type" is not a type

I'm having trouble loading one qml through another. Basically, I have created a qml type MyTabView in MyTabView.qml: import QtQuick 2.3 import QtQuick.Controls 1.2 TabView { width: 360 height: 360 Component.onCompleted: { …
bourne
  • 1,083
  • 4
  • 14
  • 27
8
votes
2 answers

How to abort loading component in Loader?

I have a Loader object that loads some very heavy components. Some event arrives in the middle of the load that requires loading to stop and go back to empty the Loader. Is it possible?
Rinat Veliakhmedov
  • 1,021
  • 1
  • 19
  • 36
6
votes
2 answers

Access Listview currentIndex from Delegate

I have a QML ListView where the delegate loads it's component from another file. When clicking on an delegate item, I want to update ListView. CurrentIndex and highlight the selected item. It works, when I explicitly set the id of the ListView.…
dh1tw
  • 1,411
  • 2
  • 23
  • 29
6
votes
4 answers

How can I get the first visible item/index from a ListView?

How can I get the first Item/index that is visible in a ListView? I looked inside the documentation and also searched a lot on the Internet but couldn't find anything. Does anyone know how to do that? Thank you!
Ispas Claudiu
  • 1,890
  • 2
  • 28
  • 54
6
votes
1 answer

How to hide a QML Window when opening a other QML Window

I need to hide The QML Window when opening the another QML Window while clicking the button,I use Loader to open the another QML Window and its only hide the QML form components not QML Window,but I currently use window component to opens the QML…
Bala Kumaran
  • 131
  • 3
  • 14
5
votes
3 answers

How to make some reusable QML object, which can inject another QML object?

How to make some reusable QML object, which can inject another object? I've ever tried to use Component & Loader , but seems not what I want. (It still encapsulate the whole QML type and lacks of elasticity, hard to reuse) Usage…
kuanyui
  • 782
  • 13
  • 23
5
votes
1 answer

Difference between QML's Component and Instantiator?

The QML types Component and Instantiator appear to do similar things; create QML objects on demand, as opposed to when parsing their definitions. So what's the difference? Why would I want to use one over the other?
JesseTG
  • 2,025
  • 1
  • 24
  • 48
4
votes
1 answer

Use createComponent in qml but the status is always error

When I use Qt.createComponent to create component dynamically, the stutas is always Component.error but I cannot understand the reason. I used it like that: Rectangle{ function loadTest(){ function finishCreation() { if…
behtgod
  • 251
  • 3
  • 15
4
votes
2 answers

Interacting with delegated QML Component in Repeater from C++

I can't access to delegated QML Component in Repeater from C++. Please find codes below. Thanks. main.cpp #include #include #include #include int main(int argc, char *argv[]) { QApplication…
Oleksandr Kozlov
  • 697
  • 6
  • 11
4
votes
1 answer

Error: QQmlApplicationEngine failed to load component

I try to register a type, but I'm getting this error: QQmlApplicationEngine failed to load component qrc:/main.qml:5 module "Komut" is not installed This is the code I'm using: QQmlApplicationEngine…
oksidez
  • 71
  • 1
  • 1
  • 7
3
votes
1 answer

How do I go about creating a Ribbon component in QT?

A Ribbon is the following component: I would like to build the component using QtQuick (QML) and PySide2 as backend. Current Solutions I have taught: I know I can build the buttons using a TopBar, i.e: I can create three different delegates for…
3
votes
3 answers

How to define QML component inline and override a property?

I'm trying and failing at something seemingly simple: define a simple text formatting component inline, then instantiate it multiple times with different text. Here's the code Item { . . . Component { id: favButtonLabelText Text { …
Steve Fallows
  • 6,274
  • 5
  • 47
  • 67
3
votes
2 answers

Extend QML Image type with an update function

As most people familiar with QML know, there is no builtin "refresh" functionality in QML Image. I would like to create a new QML type, say RefreshableImage to alleviate this problem without resorting to changing the source, which I feel is an ugly…
rubenvb
  • 74,642
  • 33
  • 187
  • 332
3
votes
1 answer

QML error: qrc:/Main.qml:24 module "system" is not installed

I am new in QML and I have a project. In one of my directories I have /imports/system/qmldir file where I have he following code: singleton System 1.0 System.qml App 1.0 App.qml and in my source file I have import system 1.0 And the error says…
Eduard Rostomyan
  • 7,050
  • 2
  • 37
  • 76
1
2 3
9 10