Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.0k Topics 77.4k Posts
  • Regarding Slider in QML

    Solved
    14
    0 Votes
    14 Posts
    5k Views
    M
    Ok I helped myself right now by creating a Rectangle and setting the anchor to the handle. Then I rendered everything necessary on top. Rectangle{ anchors.centerIn: handle z: 1 width: 76 height: 76 radius: width / 2 border.width: 3 border.color: temperatureControlSlider.pressed ? "green" : "white" color: "black" } Text{ anchors.centerIn: handle z: 1 color: "red" font.pixelSize: 30 text: temperatureControlSlider.value } } It's a bit strange because I found only solutions similar to my previous post. But maybe it's because of Qt6 or so. You need to grab the handle (which is now "invisible") but yeah. It works x)
  • Moving qml Map from first SplitView to second SplitView using takeItem and addItem

    Unsolved
    1
    0 Votes
    1 Posts
    144 Views
    No one has replied
  • spike in CPU usage replotting qml chart

    Unsolved
    1
    0 Votes
    1 Posts
    118 Views
    No one has replied
  • Import a figma design after changes didn't reflect

    Unsolved
    2
    0 Votes
    2 Posts
    183 Views
    mrjjM
    Hi and welcome to the forums. Nothing wrong with the post as such, but always good to include the Qt version used. Forgive my ignorance but Is Figma from figma.com ?
  • 0 Votes
    6 Posts
    3k Views
    J
    After updating to GCC 10, I am not facing that issue still now. Thanks for the support
  • libvlc wrapper The program has unexpectedly finished.

    Unsolved
    3
    0 Votes
    3 Posts
    330 Views
    T
    thanks is fixed i forgot to put vlc in enveirment path
  • Have Qt creator stop adding /*##^## ... ##^##*/ to files

    Solved
    8
    0 Votes
    8 Posts
    834 Views
    J
    Thanks! That solved the problem.
  • How to set country specific QML Maps locales?

    Unsolved
    1
    0 Votes
    1 Posts
    143 Views
    No one has replied
  • Load Image From Device

    Unsolved
    8
    0 Votes
    8 Posts
    651 Views
    dheerendraD
    From the directory you should read the filenames, build the model & then show them in your app.
  • PlaylistItem not working with properties

    Unsolved
    1
    0 Votes
    1 Posts
    126 Views
    No one has replied
  • Unable to write properties of Q_GADGET

    Unsolved
    1
    0 Votes
    1 Posts
    171 Views
    No one has replied
  • Same issue for me also using QuickControls2

    Unsolved
    1
    0 Votes
    1 Posts
    138 Views
    No one has replied
  • Create QML TableView from JS array best way. How?

    Solved
    2
    0 Votes
    2 Posts
    297 Views
    B
    Issue closed. Solution found. Example published here Be careful when using this kind of approach. There are a lot of memory will be used.
  • Dynamic font change in qt qml applications

    Unsolved
    1
    0 Votes
    1 Posts
    180 Views
    No one has replied
  • how to read linux device serial number

    Solved
    4
    0 Votes
    4 Posts
    389 Views
    M
    i manage solve it by using QProcess
  • Text not in the center of TextField, when creating a rounded TextField

    Unsolved
    7
    0 Votes
    7 Posts
    1k Views
    AmrCoderA
    Thank you very much for testing this, yes I think it's an issue, I even tested on QT Gallary example that comes with QT 6.2 and I added the rounded background and it give the same issue, but lower version this is not happen, I will report the Bug.
  • Usage of QtQuickCompiler in Qt6

    Unsolved
    3
    0 Votes
    3 Posts
    2k Views
    T
    @vix Hi vix, have QtSupport confirmed this?
  • Drag and Drop in separate windows

    11
    0 Votes
    11 Posts
    4k Views
    D
    I'm not able to see the video link, probably because the post is quite long ago. The issue that I see from the code above is the data is not able to be transferred from the drag area to the drop area between different windows. To resolve the issue, I had save the value in the property of the drag area, and retrieved this value from the drop area. Here's the full code. Code changes are commented as //Changes here import QtQuick 2.2 import QtQuick.Window 2.0 Window { width: 800 height: 600 visible: true ListView { id: list anchors.fill: parent model: 5 delegate: Rectangle { width: list.width height: 30 border.color: "black" border.width: 1 Text { anchors.fill: parent text: index } Item { id: draggable anchors.fill: parent property var saved_value //Changes here Drag.active: mouseArea.drag.active Drag.hotSpot.x: 0 Drag.hotSpot.y: 0 Drag.mimeData: { "mediaItem": index } Drag.dragType: Drag.Automatic Drag.onDragStarted: { saved_value = index //Changes here } Drag.onDragFinished: { } } MouseArea { id: mouseArea anchors.fill: parent drag.target: draggable } } } Window { visible: true Text { id: text anchors.fill: parent } DropArea { anchors.fill: parent keys: ["mediaItem"] onDropped: drop => { text.text += drop.source.saved_value //Changes here drop.acceptProposedAction() } } } }
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    26 Views
    No one has replied
  • ListView overshoot limit

    Solved
    4
    0 Votes
    4 Posts
    552 Views
    IntruderExcluderI
    Ok, just made it with a bit of C++ magic. ListView { readonly property real maxOvershoot: 100 property bool resetting: false boundsBehavior: contentY > 0 ? ListView.StopAtBounds : ListView.DragOverBounds // Overbound draggind allowed only at top of list model: 20 onVerticalOvershootChanged: { if (Math.abs(verticalOvershoot) >= maxOvershoot && !resetting) { resetting = true; returnToBounds(); Test.ungrab(this); // C++ grab trick } } onContentYChanged: { if (contentY === 0.0 && resetting) { resetting = false; } } delegate: Rectangle { ... } } And C++ code is quite simple: Q_INVOKABLE void ungrab(QQuickItem* list) { if (list != nullptr) { list->ungrabMouse(); list->ungrabTouchPoints(); } }