Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.2k Topics 78.1k Posts
  • Errors not in english

    Unsolved
    3
    0 Votes
    3 Posts
    96 Views
    0
    Oh, so the issue has to do with Microsoft. Thank you for your help J.Hilk!
  • Migrating to CMake - adding resource files in Qt Creator

    Unsolved
    8
    0 Votes
    8 Posts
    170 Views
    B
    @JoeCFD I am switching to CMake because it is the official Qt build tool and it is supported by Qt Creator. The documentation is increasingly defaulting to assume you use CMake and the online support such as offered by this forum contains advice about CMake. I used qmake when that was the official build tool because that was the path of least resistance. I am using CMake now for the same reason.
  • QML and protobuf: Issue with repeated nested message

    Unsolved
    1
    0 Votes
    1 Posts
    30 Views
    No one has replied
  • How do I switch the FluentWinUI3 style to Dark theme?

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

    Unsolved
    1
    0 Votes
    1 Posts
    15 Views
    No one has replied
  • What's the best workflow for Qt Design Studio & C++?

    Unsolved
    1
    0 Votes
    1 Posts
    65 Views
    No one has replied
  • QChart Range / TickCount Question

    Unsolved
    6
    0 Votes
    6 Posts
    209 Views
    Joe von HabsburgJ
    How much does it affect you if the graph's boundaries grow by one unit? If the graph is drawn correctly, there shouldn't be a problem.
  • Crash in app during render after a long time. QQuickRenderControl

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

    Unsolved
    1
    0 Votes
    1 Posts
    2 Views
    No one has replied
  • MediaPlayer does not receive stream metadata.

    Unsolved mediaplayer bug
    11
    0 Votes
    11 Posts
    2k Views
    SGaistS
    Did you already check the bug report system for this ?
  • 0 Votes
    4 Posts
    198 Views
    A
    I managed to stumble across a solution. My problem was that the header files provided by the first CMake project have to be explicitly added to the qt_add_executable stanza so that the meta-object compiler picks them up, and when I first tried it the variable I thought I read them to was, in fact, empty. This is why I received so many linker errors when using the ifdef __cplusplus in the header file. The shared header file was being used through an #import statement but for some reason meta-object compiler only processed the header file which included it, not the shared header itself. After noticing that the variable was empty I explicitly added the header files to qt_add_executable, and much to my surprise the linker error is now gone, and everything works.
  • How to get x, y from an element of ColumnLayout?

    Solved
    4
    0 Votes
    4 Posts
    186 Views
    M
    Never mind, I had to set z property of the item, not the rectangle. It seems obvious now. Thank you
  • Setting up QML module dependencies with qt_add_qml_module()´s DEPENDENCIES TARGET

    Solved
    6
    2 Votes
    6 Posts
    291 Views
    JKSHJ
    @GergoK said in Setting up QML module dependencies with qt_add_qml_module()´s DEPENDENCIES TARGET: I have reported this as a bug before I noticed your answer. They have confirmed that there is an issue here: https://qt-project.atlassian.net/browse/QTBUG-144510?focusedCommentId=2617125 Thanks for writing up the bug report. Looks like it all works as expected on Qt 6.11 (you can download the beta version now) @JKSH said in Setting up QML module dependencies with qt_add_qml_module()´s DEPENDENCIES TARGET: DEPENDENCIES TARGET only affects compile-time tools (like the QML Compiler) and edit-time tools (like the QML Language Server). It has no effect on your runtime QML engine. My apologies, this was wrong. DEPENDENCIES TARGET does put import paths inside qt.conf for the runtime engine to use without deploying.
  • Animation tekst color

    Unsolved
    6
    0 Votes
    6 Posts
    211 Views
    MarkkyboyM
    Hi @Darq Have you not looked at/for any of the QML documentation online?, there's plenty to look at, but sometimes, you will not always find directly what you want. I have linked ScaleAnimator QML docs page, it gives a Rectangle and a nested ScaleAnimator, swap out Rectangle for Text and get busy playing/experimenting, then you can add a ColorAnimation on the same block of code, so now you can scale text and change its color. Please, for yourself, do always look for documentation as most of it gives ready to paste examples to play with. ScaleAnimator QML ~ https://doc.qt.io/qt-6/qml-qtquick-scaleanimator.html ColorAnimation QML ~ https://doc.qt.io/qt-6/qml-qtquick-coloranimation.html I'll even throw in a quick code chunk you can play with, but documentation is the way to go, mostly. Text { id: scalingText text: "READ DOCS!" color: "green" anchors.centerIn: parent SequentialAnimation on scale { loops: Animation.Infinite running: true ScaleAnimator { from: 2 to: 6 duration: 1000 easing.type: Easing.InOutQuad } ScaleAnimator { from: 6 to: 2 duration: 1000 easing.type: Easing.InOutQuad } } SequentialAnimation on color { loops: Animation.Infinite running: true ColorAnimation { to: "red" duration: 4000 } ColorAnimation { to: "green" duration: 4000 } } } Good luck, it's easy when you know how!
  • QtChartJs - Chart.js for Qt 6 QML (no WebEngine)

    2
    1 Votes
    2 Posts
    109 Views
    jsulmJ
    @code-brew You should consider posting it here: https://forum.qt.io/category/8/showcase
  • Popup Qt Quick event handler issue

    Unsolved
    7
    0 Votes
    7 Posts
    321 Views
    T
    @GrecKo if the code like below: Rectangle { id: rect width: 100 height: 100 color: mouseArea.containsMouse ? "red" : "green" MouseArea { id: mouseArea anchors.fill: rect hoverEnabled: true onClicked: popup1.open() } } Popup { id: popup1 width: 200 height: 300 modal: true focus: true anchors.centerIn: parent closePolicy: Popup.CloseOnEscape contentItem : Rectangle { } } The color of id "rect" auto change to "red" when popup1 opened. (the popup auto "catch" hovered behavior on mousearea) But if i have 2 popup like the first post, when popup2 opened (by click on btn1 on popup1) , btn1 will keep hovered behavior (not "catch" by popup2)
  • Shortcut: Only binding to one of multiple key

    Unsolved
    1
    0 Votes
    1 Posts
    83 Views
    No one has replied
  • Qt Graphs lacking functionalities - Axes range

    Unsolved
    20
    1 Votes
    20 Posts
    3k Views
    B
    @J.Hilk Thank You! I successfully compiled and ran examples QuickWidgetGraphs and HelloGraphs
  • Controls appear to break bindings when interacted with

    Unsolved
    4
    1 Votes
    4 Posts
    496 Views
    J.HilkJ
    By default, Qt Quick Controls CheckBox updates its checkState when the user interacts with it (and cycles through states when tristate is enabled). That write breaks a checked: model.value binding, so if your business logic rejects the change and does not update model.value, the UI can stay desynced. Option 1: handle onToggled and re-establish the binding (and optionally snap back immediately): CheckBox { id: cb checked: model.value onToggled: function(wanted) { model.maybe_change_value_maybe_not_depends_on_complex_business_logic(wanted) if (model.value !== wanted) { cb.checked = Qt.binding(function() { return model.value }) } } } Option 2: override nextCheckState so the control never toggles itself: CheckBox { checked: model.value onClicked: model.maybe_change_value_maybe_not_depends_on_complex_business_logic() nextCheckState: function() { return model.value ? Qt.Checked : Qt.Unchecked } }
  • QML Debugger not starting, hence, Live preview not working on Ubuntu 25.10

    Unsolved
    1
    0 Votes
    1 Posts
    101 Views
    No one has replied