Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.1k Topics 77.8k Posts
  • QMouseEvent bug?

    Unsolved
    4
    0 Votes
    4 Posts
    118 Views
    Axel SpoerlA
    @zzzp Please don't post images of text. Post code using the </> code tags. If your images (which I can barely view on my PC) refer to Qt code, then please add the file and line number. Also the setup is a bit unclear to me. You are saying that "Qt program" acts as a VNC server. Which program is that? Have you written it? You say that you trigger a mouse event from a browser. Are you using a browser as a VNC client? Which one?
  • Can not use flexboxlayout

    Unsolved
    4
    0 Votes
    4 Posts
    89 Views
    GrecKoG
    Share with us your CMakeLists.txt, main.cpp and an example Main.qml reproducing this issue.
  • DelegateModel DelegateModelGroup under the hood

    Unsolved
    3
    0 Votes
    3 Posts
    340 Views
    GrecKoG
    I would recommend using a SortFilterProxyModel instead, the DelegateModel API is very cumbersome.
  • QML: Functions inside var-array model become undefined after switching Repeater model

    Unsolved
    2
    0 Votes
    2 Posts
    45 Views
    JKSHJ
    Hi @timafaer, your code works as expected for me on Qt 6.5, 6.8, and 6.10. I'm guessing that it was a bug that has now been fixed. Qt 5 and 6.2 have reached end-of-life. Please upgrade.
  • Focusing TextInput doesn't open the virtual keyboard

    Unsolved
    1
    0 Votes
    1 Posts
    45 Views
    No one has replied
  • FontLoader: Cannot load font - Solution

    Solved
    3
    3 Votes
    3 Posts
    328 Views
    KH-219DesignK
    I had a similar issue recently where I was certain that a particular file was present in the qrc compiled resources, but the paths I was using to try to "get at" the file seemed to all be invalid guesses of the qrc file path. Temporarily adding this snippet and looking at all the paths helped me solve it: QDirIterator it(":", QDirIterator::Subdirectories); while (it.hasNext()) { qDebug() << it.next(); } credit to: https://stackoverflow.com/questions/13509799/how-to-get-list-of-files-stored-in-a-qrc-qt-resorce-file
  • QML application is Crashing using CANVAS2D on QNX.

    Unsolved
    1
    0 Votes
    1 Posts
    35 Views
    No one has replied
  • Qt6 QML Multimedia: How to set up and use alsasink?

    Unsolved
    1
    0 Votes
    1 Posts
    37 Views
    No one has replied
  • QQuickWidget embeded in QDialog has no hover effection at show

    Unsolved
    1
    0 Votes
    1 Posts
    62 Views
    No one has replied
  • Tutorial "Introduction to Qt Quick Controls", Fallen at first hurdle.

    Unsolved
    6
    0 Votes
    6 Posts
    181 Views
    J
    OK, one learns from ones mistakes. It appears that the CMakeLists.txt file autogenerated by Qt Creator hadn't included the RESOURCES element of 'qt_add_qml_module()'. Was this something I missed when configuring the project initially or is it something that must be added manually as the project evolves? This doesn't even come over clearly in the documentation, CMakeLists.txt doesn't even get a mention.
  • dbus

    Unsolved
    5
    0 Votes
    5 Posts
    162 Views
    O
    Thanks. Do I take from your answer that there is no interface to interact with dbus from QML other than external command such as qdbus?
  • Problem with CheckBox

    Unsolved
    3
    0 Votes
    3 Posts
    110 Views
    JoeCFDJ
    I test your following code with Qt 6.10 on Ubuntu 22.04 and did not see any issue. run the command qml filename.qml import QtQuick import QtQuick.Controls Item { Rectangle { anchors.fill: parent Image { width: parent.width height: parent.height //source: Style.imageBackground } //HeaderBox { // headerText: "Willkommen zur Schafkopfverwaltung" //} Column { id: scrollView anchors { left: parent.left right: parent.right top: parent.top bottom: parent.top //margins: Style.sizeScreenMargin } clip: true } Text { text: "Hello World!" font.family: "Helvetica" font.pointSize: 24 color: "red" } CheckBox { id: parentBox text: qsTr("Parent") checkState: Qt.Checked//childGroup.checkState } } }
  • Application Crashing

    Unsolved
    7
    0 Votes
    7 Posts
    231 Views
    S
    @jsulm .core files are generated but we are not able to read it or tranfer it to another device due to boards ifs file system restrictions and remote debugging also can't be enabled as board doesn't have network connectivity and also we can't able to say actual core dump is generated or not.
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    47 Views
    No one has replied
  • Obtaining window-local position updates for element in ListView delegate

    Solved qml qml c++
    5
    0 Votes
    5 Posts
    163 Views
    M
    Bonus question: Would you happen to know how to re-implement this in C++? I tried my best but I don't think my best is good enough haha: #pragma once #include <QQuickItem> #include <qproperty.h> // Item that tracks when its window-local position is changed at any point class PositionTrackingItem : public QQuickItem { Q_OBJECT QML_ELEMENT Q_PROPERTY(QPointF globalPosition READ getGlobalPosition NOTIFY globalPositionChanged BINDABLE bindableGlobalPosition) public: PositionTrackingItem(QQuickItem* parent = nullptr); inline QPointF getGlobalPosition() const { return globalPosition; } QBindable<QPointF> bindableGlobalPosition() { return &globalPosition; } signals: void globalPositionChanged(); private: Q_OBJECT_BINDABLE_PROPERTY(PositionTrackingItem, QPointF, globalPosition, &PositionTrackingItem::globalPositionChanged) }; #include "PositionTrackingItem.h" #include <qproperty.h> // https://forum.qt.io/post/833294 PositionTrackingItem::PositionTrackingItem(QQuickItem* parent) : QQuickItem(parent) { globalPosition.setBinding([&]() { QPointF pos = QPointF(property("x").toFloat(), property("y").toFloat()); for (QQuickItem* item = property("parent").value<QQuickItem*>(); item != nullptr; item = item->property("parent").value<QQuickItem*>()) pos += QPointF(item->property("x").toFloat(), item->property("y").toFloat()); return pos; }); }
  • qt qml load assets from apk in android devices

    Unsolved
    6
    0 Votes
    6 Posts
    322 Views
    SGaistS
    Hi, You should add which version of Qt you are using.
  • How to fit Button to icon size?

    Solved
    7
    0 Votes
    7 Posts
    294 Views
    SGaistS
    Damn ! I somehow missed that you were using QML 😅 Sorry for the wrong hints. I am glad that @GrecKo was able to help you
  • Q_PROPERTY Produces TypeError When Setting QQuickWidget ContextProperty

    Solved
    6
    0 Votes
    6 Posts
    402 Views
    D
    Thank you @JKSH this really helped.
  • Qt Quick QML Read Data over Serial Port and Show on GUI

    23
    0 Votes
    23 Posts
    24k Views
    S
    A lightweight, extensible Qt QML-based serial terminal quick start project I use to build custom interfaces, visualize data, and interact with microcontrollers (Arduino/FPGA). https://github.com/shemeshg/LetsGetSerial
  • create Qml sub modules

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