Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.0k Topics 77.3k Posts
  • accu gauge

    Solved
    2
    0 Votes
    2 Posts
    162 Views
    S
    Solved :-) the problem was the tickmarkStepSize : 4 Rectangle { x : 70 y : 400 width: 200 height: 50 color: "#808080" Gauge { id: accu anchors.fill: parent anchors.margins: 10 orientation : Qt.Horizontal tickmarkStepSize : 0.5 tickmarkAlignment: Qt.AlignBottom minimumValue: 11 maximumValue: 13 value: 12.6 style: GaugeStyle { valueBar: Rectangle { implicitWidth: 10 color: (accu.value <= 12) ? "red" : (accu.value <= 12.5) ? "yellow" : "green" } } } }
  • How to Send QML image to C++ side

    Solved
    5
    0 Votes
    5 Posts
    752 Views
    SGaistS
    Are you trying to implement something like described here ?
  • First attempt to use Qt networking on QML apps

    Unsolved
    28
    0 Votes
    28 Posts
    3k Views
    Q
    Is the problem still ambiguous, please? I tried hard but can't find the issue. :(
  • How Disable ScientificNotation on TextField

    Solved
    4
    0 Votes
    4 Posts
    2k Views
    B
    It works, thank you for your answers, @J-Hilk 's solution fits my need more, thank you anyway for your answer @lemons :)
  • Qt6 QML book example source

    Solved
    3
    0 Votes
    3 Posts
    391 Views
    J
    That works. Thank you.
  • QML screen rotation

    Unsolved
    1
    1 Votes
    1 Posts
    478 Views
    No one has replied
  • Window Component not showing up in Deisgner for QtQuick qml

    Unsolved
    1
    0 Votes
    1 Posts
    166 Views
    No one has replied
  • How to load different components with different properties in the same Loader?

    Solved
    3
    0 Votes
    3 Posts
    307 Views
    jeanmilostJ
    @fcarney Thank you for your answer. Finally I could resolve my issue by getting the Loader created by the Repeater, and to calling its setSource() function directly, with the correct properties, adapted for each component I need to load.
  • Dynamic height of tableviewcolumn according to text length

    Unsolved
    2
    0 Votes
    2 Posts
    686 Views
    L
    @Laito Unfortunately I almost forgot about the old quick controls. Here is an idea of how you could do it with the new controls. Note, I added a wrapper for spacing around the table, to show there is no overflowing: import QtQuick.Window 2.15 import QtQuick 2.15 import QtQuick.Controls 2.15 import Qt.labs.qmlmodels 1.0 ApplicationWindow { title: qsTr("TableView example") id: root width: 500 height: 400 visible: true Item { id: wrapper anchors.fill: parent anchors.margins: 20 HorizontalHeaderView { id: header z: 1 interactive: false syncView: tableView anchors.top: parent.top implicitHeight: 50 model: ["Number", "Elevation Max", "Elevation Min", "Length", "Depth"] delegate: Rectangle { implicitWidth: 100 implicitHeight: 50 color: "#0A1B2D" Text { anchors.fill: parent anchors.margins: 5 wrapMode: Text.Wrap text: modelData color: "#ffffff" font.pixelSize: 15 horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter } } } TableView { id: tableView anchors.fill: parent topMargin: header.implicitHeight columnSpacing: 1 rowSpacing: 1 clip: true flickableDirection: Flickable.VerticalFlick boundsBehavior: Flickable.StopAtBounds property int selectedRow: -1 model: TableModel { TableModelColumn { display: "number" } TableModelColumn { display: "elevation_Max" } TableModelColumn { display: "elevation_Min" } TableModelColumn { display: "length" } TableModelColumn { display: "depth" } rows: [{ "number": 1, "elevation_Max": 90000, "elevation_Min": 50, "length": "52-73\n122-163\n200-264\n280-317", "depth": "8636-8900" }, { "number": 2, "elevation_Max": 8000, "elevation_Min": 21, "length": "0-57\n119-166\n206-264\n119-166\n206-264\n119-166\n206-264\n119-166\n206-264", "depth": "12700-13462" }, { "number": 3, "elevation_Max": 8000, "elevation_Min": 21, "length": "0-57", "depth": "12700-13462" }, { "number": 3, "elevation_Max": 8000, "elevation_Min": 21, "length": "0-57", "depth": "12700-13462" }, { "number": 3, "elevation_Max": 8000, "elevation_Min": 21, "length": "0-57", "depth": "12700-13462" }, { "number": 3, "elevation_Max": 8000, "elevation_Min": 21, "length": "0-57", "depth": "12700-13462" }, { "number": 3, "elevation_Max": 8000, "elevation_Min": 21, "length": "0-57", "depth": "12700-13462" }, { "number": 3, "elevation_Max": 8000, "elevation_Min": 21, "length": "0-57", "depth": "12700-13462" }, { "number": 3, "elevation_Max": 8000, "elevation_Min": 21, "length": "0-57", "depth": "12700-13462" }, { "number": 3, "elevation_Max": 8000, "elevation_Min": 21, "length": "0-57", "depth": "12700-13462" }, { "number": 3, "elevation_Max": 8000, "elevation_Min": 21, "length": "0-57", "depth": "12700-13462" }, { "number": 3, "elevation_Max": 8000, "elevation_Min": 21, "length": "0-57", "depth": "12700-13462" }] } delegate: Rectangle { implicitWidth: 90 implicitHeight: content.implicitHeight color: tableView.selectedRow === row ? "#052641" : "#394755" MouseArea { anchors.fill: parent onClicked: tableView.selectedRow = row } Text { id: content width: parent.width padding: 10 text: display color: "#ffffff" horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter wrapMode: Text.Wrap } } } } }
  • How to make the SplineSeries's appended values permanent?

    Unsolved
    1
    0 Votes
    1 Posts
    128 Views
    No one has replied
  • [SOLVED] Qt 6.2.2 - Drag & Drop broken in Quick?

    Solved
    2
    0 Votes
    2 Posts
    479 Views
    T
    Thank you very much. I'm struggling a lot before I saw that post
  • how to display huge amount data in qml chartview LineSeries?

    Unsolved
    2
    0 Votes
    2 Posts
    464 Views
    fcarneyF
    This is not sustainable. Cache the data to disk and load n points from this cache. Give yourself the ability to scroll through the data that was collected. Maybe a date time lookup. I like to use sqlite databases for stuff like this and then I just do queries using the qdatabase classes.
  • Nodeinstantiator performance issue

    Unsolved
    1
    0 Votes
    1 Posts
    254 Views
    No one has replied
  • How to assign each data point with different color in scatter charts in QML

    Solved
    2
    0 Votes
    2 Posts
    683 Views
    P
    @Praveen-Illa There is currently no way to give each data point in the same series a different colour. As a workaround, you can split your data points into multiple series (for example, 1 point per series). This will allow you to set different colours to each of the points.
  • QML ColorDialog within a Page

    Unsolved
    1
    0 Votes
    1 Posts
    134 Views
    No one has replied
  • Use Delegate in ComboBox

    Unsolved
    2
    0 Votes
    2 Posts
    349 Views
    TassosT
    @chiyuwang Your model should provide a role name for the desired value, let's say value, then you can inform the combobox via its valueRole property. See the example below, copied from Qt documentation ApplicationWindow { width: 640 height: 480 visible: true // Used as an example of a backend - this would usually be // e.g. a C++ type exposed to QML. QtObject { id: backend property int modifier } ComboBox { textRole: "text" valueRole: "value" // When an item is selected, update the backend. onActivated: backend.modifier = currentValue // Set the initial currentIndex to the value stored in the backend. Component.onCompleted: currentIndex = indexOfValue(backend.modifier) model: [ { value: Qt.NoModifier, text: qsTr("No modifier") }, { value: Qt.ShiftModifier, text: qsTr("Shift") }, { value: Qt.ControlModifier, text: qsTr("Control") } ] } }
  • 0 Votes
    1 Posts
    1k Views
    No one has replied
  • Sending messages from a client to server using network on the same machine

    Unsolved
    31
    0 Votes
    31 Posts
    7k Views
    Q
    @Bob64 The fortune client/server apps are different from (at least) that point of view that the server sends messages to the client by a button on the client. It's way different from mine. Well, these two QML apps are considerably simple but I don't know why we (helpers and me) can't work it out and get them to work! :(
  • 0 Votes
    5 Posts
    1k Views
    G
    @jsulm I wrote the error message
  • How to make this menu ?

    Unsolved
    6
    0 Votes
    6 Posts
    544 Views
    ?
    @lemons working like charm ! @GrecKo thanks i will review