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
0 answers

QML ListView Resize Custom Widget delegate

I have the following problem: I have a ListView with movies like this: I would like at the moment when I will click into a movie to get a bit bigger on with and high independently the rest of them, but for some reason, I'm getting this. I've…
Mircea
  • 1,671
  • 7
  • 25
  • 41
0
votes
1 answer

QML ScrollBar combined with ListView

I'm new to QML and QT so don't blame me if this question is going to sound stupid for most of you but I've search all over the internet without any luck in founding an answer. What I'm trying to do: I'm having a ScrollView which has inside of it a…
Mircea
  • 1,671
  • 7
  • 25
  • 41
0
votes
1 answer

How to refresh a combo-box in qml after sending a signal

Basically, I have a combo-box in qml that I populate using a QStringList. However, I'm not able to refresh the combo-box (reload) to show the list has changed. I looked into doing that using the Loader but I couldn't figure it out. Can someone guide…
blessedone
  • 160
  • 1
  • 8
0
votes
1 answer

Check if a descendant has activeFocus == true in QML

Inside a deeply nested QML GUI, is there an easy way to find out if any child or grandchild etc of an Item has activeFocus == true ? Item { id: intermediateItem visible: anyDescendantHasActiveFocus(intermediateItem) ? true : false Item { …
danba
  • 842
  • 11
  • 32
0
votes
1 answer

Why does QQmlComponent::create() return nullptr?

Under what conditions does QQmlComponent::create(QQmlContext *) fail by returning nullptr? The documentation only says " Returns nullptr if creation failed" without further detail. My backend C++ code tries to instantiate a MessageDialog from the…
Tomasso
  • 693
  • 2
  • 9
  • 17
0
votes
2 answers

How to "pull" data from c++ to qml?

I want "pull"data from c++ in qml like this: Component.onCompleted: { MySettings.loadMainWindowPosition(aAppWnd.x, aAppWnd.y, aAppWnd.width, aAppWnd.height, aAppWnd.visibility); } When MySettings registered in the following…
AeroSun
  • 2,401
  • 2
  • 23
  • 46
0
votes
1 answer

Qt application not working with qrc prefixes

I think I'm missing some fundamental way of working with various prefixes in the Qt Creator qrc environment. If I place a qml component in the default prefix, the application builds and runs fine. But if I add a new prefix and then add a new…
Steve H
  • 5,479
  • 4
  • 20
  • 26
0
votes
2 answers

How to make Rectangle behaves like a scrollbar in qml

I am trying to make a scroll bar without using ScrollBar Component in QML. So i have made this component and attach to the ListView. But it doesn't flick the listview items. I want, this rectangle scrolls the content of ListView or GridView on…
Shubham Gupta
  • 31
  • 1
  • 7
0
votes
1 answer

How to enable handwriting recognition in qt?

In the image you can see that the HWR button is enabled(green) but the input panel to write using mouse pointer is not comingI am trying to run handwriting recognition example(basic.pro) provided by qt. The application is getting launched with qt…
Karthikg
  • 1
  • 1
0
votes
2 answers

Enter and Leave animation in QML

In my qml application there is content area "Item" and it have a "loader" for load qml file. I want to implement leave and enter animation effect For example my current source of loader is "First.qml" when i set source other qml file(second.qml).…
hareesh
  • 37
  • 7
0
votes
0 answers

Specifying the index of dynamically created QML components within a Layout?

I'm using Javascript to dynamically create a QML component via: var component = Qt.createComponent(qmlURL) var item = component.createObject(parentLayout, properties) In this case, the parentLayout is a ColumnLayout and it always creates the object…
DavidJ
  • 4,369
  • 4
  • 26
  • 42
0
votes
1 answer

Names of QML nested items

I'm trying to parse QML file using QQmlComponent: QQmlComponent component(&engine, QUrl::fromLocalFile("src/WorkModels/MyModel.qml")); QObject *object = component.create(); qDebug() << toJson(object); foreach(auto action, …
ephemerr
  • 1,833
  • 19
  • 22
0
votes
1 answer

Qt: Qml: Focus on text field when a dialog is created

I have a simple dialog that has two text fields. I would like to have the text field labelField focused when AddPasswordDialog dialog shows up. How can I achieve that? I asked this question and I was asked to provide a MCVE, and here I provide it.…
The Quantum Physicist
  • 24,987
  • 19
  • 103
  • 189
0
votes
1 answer

How to get the X and Y translated values applied to a QQuickItem on to the C++ side

I have the following QML Rectangle which has a parent item. The most important thing to note is that it applies a Translate QML element which I am struggling to understand as to what exactly it does the QML item and its children it applies to. Code:…
TheWaterProgrammer
  • 7,055
  • 12
  • 70
  • 159
0
votes
1 answer

SetProperty for loaded QML component without using SetContextProperty

I have a C++ plugin system, where a QQmlComponent is created and a qml file is loaded when the user requests a new plugin instance. Currently I am using setContextProperty() to tell QML about a QObject that is needed for proper…
ToeBee
  • 241
  • 4
  • 10