Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.0k Topics 77.4k Posts
  • Custom Map Plugin is not detected

    Unsolved
    1
    1 Votes
    1 Posts
    259 Views
    No one has replied
  • Text component. double variable as source. Number of digits after comma.

    Solved
    3
    0 Votes
    3 Posts
    476 Views
    K
    @mzimmers said in Text component. double variable as source. Number of digits after comma.: text: Number(11.111111).toFixed(2) This works fine text: qsTr("%1 km/h").arg(Number(rate.speed).toFixed(2))
  • Show GUI like an overlay in games

    Unsolved
    2
    0 Votes
    2 Posts
    259 Views
    md2012M
    [image: screenshot-16.png]
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    7 Views
    No one has replied
  • How to convert the label format to minutes in QML

    Unsolved
    1
    0 Votes
    1 Posts
    139 Views
    No one has replied
  • controlling dimming level behind Drawer?

    Solved
    7
    0 Votes
    7 Posts
    563 Views
    J.HilkJ
    @mzimmers thank you, but thinking about it a bit more, I would rather suggest this one: color: Qt.rgba(col.r, col.g, col.b, 0.2) removes the necessity of a local property and the onCompleted function
  • aligning text RowLayout to another object

    Solved
    11
    0 Votes
    11 Posts
    2k Views
    JoeCFDJ
    I guess you can add another layout ColumnLayout for label gpm and allgn or push it to the botton of the layout
  • QML set-up, parameters available onCompleted ?

    Solved
    1
    0 Votes
    1 Posts
    197 Views
    No one has replied
  • C++ / QML property problem

    Solved
    2
    0 Votes
    2 Posts
    223 Views
    SPlattenS
    Added to DataModel.qml: property alias api: simonP And implemented in stale.qml: dpt.api.setInterfaceStatus(false); hdg.api.setInterfaceStatus(false);
  • Qt Quick Demo - RESTful API client Address Book

    Unsolved
    7
    0 Votes
    7 Posts
    1k Views
    P
    Hi, I am getting below mentioned error, when I am trying to connect QHttpServer desktop application from WebAssembly client application which is running on browser. I am Using QNetworkAccessManager module in the webAssembly client appliaction to access QHttpServer application here. Error: qtloader.js:370 Reply Error Code: QNetworkReply::ProtocolUnknownError Thanks, Pradson
  • How change source in Video

    Unsolved
    4
    0 Votes
    4 Posts
    281 Views
    SGaistS
    Is it on auto play ?
  • Periodically update data in QML [Solved?]

    Solved
    4
    0 Votes
    4 Posts
    494 Views
    JoeCFDJ
    @Kuzma30 said in Periodically update data in QML [Solved?]: void setChannelData(QList<double> channelData) { m_channelData = channelData; //set current data value } No timer is needed. void setChannelData(QList<double> channelData) { if (channelData.size() != m_channelData.size() /*or something like contents changed*/ ) { m_channelData = channelData; //set current data value emit channelDataChanged(); //to tell qml things have changed for update } }
  • Laying one item on top of another

    Solved
    7
    0 Votes
    7 Posts
    2k Views
    mzimmersM
    I got this working with anchors and margins: import QtQuick 2.12 Item { id: sliderTile Item { id: sliderItem height: sliderTile.height width: sliderTile.width anchors.top: parent.top anchors.horizontalCenter: parent.horizontalCenter CircularSlider { id: circularSlider width: sliderTile.width * 0.8 height: width } RowLayout { anchors.top: sliderTile.verticalCenter anchors.topMargin: 30 anchors.left: sliderTile.left anchors.leftMargin: (sliderTile.width - sliderProperties.diameter) / 2 Text { text: "some text here" } } } (this code snippet isn't complete; just showing how I got the text into the correct position.) [image: 15e59e81-bb7d-4890-8548-ad4d14058188.PNG] Definitely not the most elegant, but it works. I'll improve upon it down the road. Thanks for all the suggestions...
  • This topic is deleted!

    Unsolved
    3
    0 Votes
    3 Posts
    182 Views
  • Video can play only one video

    Solved
    3
    0 Votes
    3 Posts
    275 Views
    M
    I fix this using this code function playVideo() { videoStep.position = 0 // videoStep.play() videoStep2.position = 0 if (videoStep.visible) { videoStep.visible = false videoStep.stop() videoStep2.visible = true videoStep2.play() } else { videoStep2.visible = false videoStep2.stop() videoStep.visible = true videoStep.play() } }
  • ScatterSeries marker shapes: brushFilename seems to be ignored?

    Unsolved
    7
    1 Votes
    7 Posts
    3k Views
    A
    @peteispo Hi For adding any icons or shapes(as png or svg) you need to create a 'QBrush' in c++ side and pass it to qml. for example: .h side: public slots: QBrush chartBrush() const; .cpp side: QBrush GUI::chartBrush() const { QBrush m_chartBrush; QPixmap texture("/home/allenmvi/Downloads/triangle_PNG112.png"); //or svg file int w = 30; //set width for your shape int h = w; //set height for your shape m_chartBrush.setTexture(texture.scaled(w,h,Qt::KeepAspectRatio)); return m_chartBrush; } in qml side: ScatterSeries{ id:scatterSery axisX: myAxisX axisY: myAxisY markerSize: 30 name:"Scatter" borderColor: "transparent" brush: gui.chartBrush markerShape: ScatterSeries.MarkerShapeRectangle } *Note: the useOpenGL property should be false , if it is true , scatter just read your QBrush color.
  • resolvedUrl is unexpectedly prefixed

    Unsolved
    1
    0 Votes
    1 Posts
    335 Views
    No one has replied
  • QT Application issue for Android

    Unsolved
    1
    0 Votes
    1 Posts
    222 Views
    No one has replied
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    1 Views
    No one has replied
  • How to add C++ QQuickPaintedItem in QML

    Unsolved qt6 qml types qml c++
    4
    0 Votes
    4 Posts
    1k Views
    C
    I am pretty sure you need to register it to the qmlEngine via qmlRegisterType<NotchedRectangle>("My.Items", 1, 0, "NotchedRectangle"); In your main.cpp, then you should be able to use it. (https://www.qt.io/blog/qml-type-registration-in-qt-5.15) In your qml file you can then just type: import My.Items and then you should be able to use NotchedRectangle