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 - SpinBox - Data validation

I have the following SpinBox model which I am trying to recreate using the new QtQuick.Control 2, because this one it's using version 1. And I've encountered some problems which I am not sure how to solve. On the validation side, I should not be…
Mircea
  • 1,671
  • 7
  • 25
  • 41
0
votes
3 answers

QML: Implement custom control with rectangles

I want to implement one control with 7 layers of rectangle. Top and bottom 2 rectangles are of the same size. But middle 3 rectangles are 1/3rd of width of the top and bottom 2 rectangles also two of such sets. The spacing between the rectangles…
Makarand
  • 13
  • 3
0
votes
2 answers

highlight QML ListView Item on mouse click

I have noticed that the listview will highlight the first item automatically/by defualt how can I disable it and only highlight the item item I have selected on mouse click? Component { id: highlight Rectangle { width: 180; height: 40 color:…
MDkman
  • 67
  • 2
  • 13
0
votes
1 answer

Is there any way to use a C++ class as a QML component which would be available in designer to drag & use?

I have a C++ class in which I set the image path which will be available only at run time. I want to use my class as a Custom QML component which should be available in designer tab & I can drag that & use in form editor.
0
votes
0 answers

QQmlComponent initialization

i have an application which sets properties of Qml from C++, so far i was able to set property of any type. I am able to create QQmlComponent in C++ and set it to property. But first i need to initialize component with its properties. I can do that…
Kwan
  • 23
  • 4
0
votes
2 answers

How propagate an attached property to children in Qml?

I wanna make something like Material.accent, where I can change in the parent and children getting the parent property definition. Here is the way I did at this time, but I can't find any information about it in the documentation. I know it is…
0
votes
1 answer

How to create custom local template object in qml?

In my qml file i have a lot of uniform objects with few differencies (id for example). I want to use "Don't Repeat Yourself" principle So i want create custom local template, which i'll can append with unique properties on using. I know about…
Nikxp
  • 355
  • 3
  • 13
0
votes
2 answers

Custom Component in qml

I am Using custom inputRow and MenuButton is placed Outside component when i try to print value of Val1 and Val2 it gives "ReferenceError: val1 is not defined", how can i access it Outside component. InputRow { name:"Command" enabled: true …
Sush
  • 21
  • 4
0
votes
1 answer

How to add ScaleBarOverlay into arcgis map

Above screenshot is done using custom Scalebar Component, i am wondering to resize scale bar on zoom in and zoom out of Mapview. ScaleBar{ anchors.left: mapView.left anchors.bottom: mapView.bottom …
Sush
  • 21
  • 4
0
votes
1 answer

QML ERROR :invalid property name minX (M16)

i Am using Qt 5.12.8 , i have imported import QtQml.Models 2.2 import QtQuick 2.7 import QtQuick.Controls 2.2 import QtQuick.Layouts 1.3 but i get this error :invalid property name minX (M16) . Can some one guide me what is my…
Sush
  • 21
  • 4
0
votes
2 answers

Integration of Exposed model into ListModel QML

I have exposed successfully a list that contain 3 integer from C++ to my main.qml using ListView in main.qml ListView { width: 200; height: 250 required model delegate: Text { required property int longitude required property int latitude …
Hanna
  • 53
  • 1
  • 1
  • 4
0
votes
1 answer

Am I missing something or this is the way to create custom control/component

In my Card.qml, I've these: import QtQuick 2.9 import QtGraphicalEffects 1.0 import QtQuick.Layouts 1.3 Item { default property alias content: x.children /*contentItem.data*/ property alias header: header.text Rectangle{ id:…
user6283344
0
votes
1 answer

QQuickWidget "closed" signal

What signal does it tell me when the QQuickWidget closes? For example I wrote the following code : QQuickWidget *view = new QQuickWidget; view->setSource(QUrl::fromLocalFile("main.qml")); view->show(); I have an ApplicationWindow in the main.qml…
Parsa Mousavi
  • 1,052
  • 1
  • 13
  • 31
0
votes
1 answer

Update Custom QML component from from C++

I am working on a c++/QML with Opencv Project.. I have found that the best way to view the processed image in QMl is to write a custom QML component that extends QQuickPaintedItem in c++ and it is working well: class ImageView : public…
Samir N Ahmad
  • 575
  • 6
  • 16
0
votes
2 answers

How to drag and drop component on map in mousearea and get real time map coordinates

I want to drag a MapQuickItem which is declare inside the component and gets real time coordinates from map. When run the code I get the error "qrc:/main.qml:15: ReferenceError: mouseArea is not defined" like this.How to access mouseAea outside the…
srs
  • 121
  • 8