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

How to move a component with a custom property to a separate file in QML

I have a delegate for a language-selection list. Each item in the list contains an icon and text. I'd like to move the component definition to a different file and provide the string currently defined by IMGDIR as a property. Simply moving the…
Valentin H
  • 7,240
  • 12
  • 61
  • 111
3
votes
3 answers

Create separate QML window from C++ code

In my application I want to create another window with QML UI from C++ code. I know it's possible to create another window using QML Window type, but I need the same thing from C++ code. So far I managed to load my additional qml file into…
Aleksei Petrenko
  • 6,698
  • 10
  • 53
  • 87
3
votes
1 answer

Qt create component from relative URL

In the 4.8 docs, it is specified that: When using files with relative paths, the path should be relative to the file whereQt.createComponent() is executed. So I use the following to create an…
OJFord
  • 10,522
  • 8
  • 64
  • 98
3
votes
1 answer

Reusing a delegate component in QML

I came across a weird problem when designing my application in QML. The following code works: TableView { itemDelegate: Item { function a() {} Loader {} } } I have a bunch of functions, properties, and loaders in this item delegate…
Alex
  • 34,581
  • 26
  • 91
  • 135
2
votes
1 answer

QML: How to add children to a base component's child instead of the root object of the component?

I have a base component named MyChart.qml like this Item { id: root ChartView { id: myChartView } RowLayout { id: myToolbar } } } So it's basically a chart with a toolbar underneath it. I…
2
votes
1 answer

QML how to get index number in a ListView by clicking a checkbox defined inside a delegate of a listView?

Well I am trying to make a list of items having two texts and a checkbox in a listView. I wanted to add the price of the item when the checkbox is checked. To accomplish this, I need to know the index of the item of a listView so that I could get…
2
votes
1 answer

Dynamic changing of Language in QML view

In my project, there is a language page with four language options. If we change them, entire application language and some images changes. My problem is is there any signal/ callback to switch resources as like in Android or any some other…
Raviteja
  • 86
  • 8
2
votes
2 answers

How do I align my qml component properly?

I'm trying to write simple QML application, which will consist of many repeated elements, organized in rows. The outcome will be similar to the one presented below: Currently, I have a repetitive piece of code which achieves this goal: import…
Rozek
  • 53
  • 10
2
votes
4 answers

How to run and show 4 executables in one qt qml window?

I have a 4 different executable program, you can consider that those are empty rectangle same sized windows, and i want to run those exes in one qt qml window. a,b,c,d are different executables that fixed same size, and x is a windows that written…
ikaloron
  • 59
  • 8
2
votes
0 answers

QML Extension Plugin

How do we use the dll file created by QML Extension Plugins? The link regarding dll file creation, doesn't give enough information about how do we exactly use the dll file in other projects (Qt Quick applications). A simple example on this with step…
2
votes
2 answers

How to get a valid instance of a QQuickItem on C++ side

Alright. I have searched a lot but haven't got a good solution yet. I am new to Qt. I have a class which is a QQuickItem like so, class MyQuickItemClass : public QQuickItem { Q_OBJECT SetInfo(SomeCppClass object) }; I do a qmlRegisterType…
TheWaterProgrammer
  • 7,055
  • 12
  • 70
  • 159
2
votes
2 answers

data is not fetching for dynamic delegates with dynamic models in QML

I am facing issue loading dynamic delegates with dynamic models using the Loaders. I am able to see the delegate of the corresponding model, but data in that delegate is not displaying. When clicking on the button, getting the error as "…
2
votes
1 answer

QT5- Installing Qt Quick Components for Desktop

I have some installation issues with the Qt Quick Components for Desktop, using QT5. Following are the steps I have followed (based on these instructions): Downloaded the tar.gz from http://qt.gitorious.org/qt-components/desktop/trees/master, and…
user3114639
  • 1,895
  • 16
  • 42
2
votes
1 answer

Qml Nested List Model Append Data

I have my list mode ListModel { id: nestedModel } and I can append the list model using the code nestedModel.append({ locationName: qsTr("Location5"), collapsed: true, folders: [{ …
Haris
  • 13,645
  • 12
  • 90
  • 121
2
votes
2 answers

How to fill a QTableview using QML Tool Button

I need to press my create button under red circle and by pressing this button i am trying to fill first row of my table view. I am a new user in QT Quick please help me. I have wasted lot of time but have no way to do it. I am providing UI and code…
User
  • 619
  • 1
  • 9
  • 24
1
2
3
9 10