Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.0k Topics 77.3k Posts
  • FontLoader not loading woff2 format

    Unsolved
    8
    0 Votes
    8 Posts
    538 Views
    SGaistS
    Use forward slashes for your paths. Backslashes are for escape sequences. AFAIR, it's the file:// scheme to grab stuff from your local drive
  • JS Fetch API in QML

    Unsolved
    2
    0 Votes
    2 Posts
    169 Views
    piervalliP
    You find an example in the doc. https://doc.qt.io/qt-6/qml-qtqml-xmlhttprequest.html
  • customize my ApplicationWindows in Qml

    Unsolved
    5
    0 Votes
    5 Posts
    307 Views
    S
    ok thanks
  • Connect cpp signal to qml registered cpp class

    Unsolved
    3
    0 Votes
    3 Posts
    264 Views
    S
    Modify dataGenerator Signal: Qt does not allow non-const references (&) in signals for queued connections. Modify the signal to use a const reference: class dataGenerator : public QObject { Q_OBJECT signals: void DataChunkGenerated(const QVector<double> &dataChunk); // Use const reference }; 2. Ensure dataDisplay Slot Matches the Signature: Your dataDisplay class already has: class dataDisplay : public QObject { Q_OBJECT public slots: void updateData(const QVector<double> &dataChunk); }; This matches the modified signal. Connect the Signal to the Slot in C++: You can establish the connection in main.cpp or wherever you create these objects: dataGenerator *generator = new dataGenerator(); dataDisplay *display = new dataDisplay(); // Connecting the signal from dataGenerator to the slot in dataDisplay QObject::connect(generator, &dataGenerator::DataChunkGenerated, display, &dataDisplay::updateData);
  • Custom ComboBox not scrolling

    Unsolved combobox scroll
    2
    0 Votes
    2 Posts
    270 Views
    S
    It seems the issue you're experiencing with the ComboBox not scrolling when there are many items is due to the absence of proper height configuration for the ListView inside the Popup. The ListView needs an explicit height to trigger scrolling behavior, and without it, the dropdown won't scroll even when there are many items. To fix this, you can add a fixed or constrained height to the ListView, and ensure the ScrollIndicator appears when needed. Here's the updated code for the popup section: popup: Popup { y: control.height - 1 width: control.width implicitHeight: contentItem.implicitHeight padding: 0 contentItem: ListView { width: parent.width height: Math.min(200, contentHeight) // Constrain the ListView height or set a max height clip: true model: control.popup.visible ? control.delegateModel : null currentIndex: control.highlightedIndex ScrollIndicator.vertical: ScrollIndicator { visible: contentHeight > height // Only show the scroll indicator if the content exceeds the viewable area } } background: Rectangle { radius: 0 color: Qt.color(AppTheme.colors["UFO_ComboBox_Popup_Background"]) border.color: Qt.color(AppTheme.colors["UFO_ComboBox_DropBox_Border"]) } }
  • Basic QML object declaration syntax question

    Solved
    4
    0 Votes
    4 Posts
    210 Views
    Tom assoT
    @JonB Oh, that makes total sense! Thanks!
  • QMediaRecorder not record using QVideoFrameInput

    Unsolved
    1
    0 Votes
    1 Posts
    115 Views
    No one has replied
  • Face coloring on custom geometry

    Unsolved
    2
    0 Votes
    2 Posts
    195 Views
    johngodJ
    Hi @OlivierD You can use colorsemantic using the addAttribute(....) to define a color for each face , iirc just make sure that in the model Material you set lighting: DefaultMaterial.NoLighting
  • PathView delegate use attached attributes

    Solved
    9
    0 Votes
    9 Posts
    612 Views
    JoeCFDJ
    @Fan__ said in PathView delegate use attached attributes: QtVersion: 5.12.5 QtVersion: 5.12.5 is too old. Upgrade Qt above 5.15 or 6.8.
  • Different rendering of c++ QtLabel and Qml label

    Unsolved
    6
    0 Votes
    6 Posts
    390 Views
    GrecKoG
    The sizeHint of a QQuickWidget is based on the actual size of it's root item and not on its implicit size, I think that explains the discrepancy. minimumSizeHint() or minimumSize() are not implemented for QQuickWidget but they are for QLabel. You could try inheriting from QQuickWidget and override both sizeHint and minimumSizeHint by returning its root QQuickItem's implicit width/height.
  • Cannot clear selection in GridView/ListView

    Solved
    2
    0 Votes
    2 Posts
    201 Views
    T
    Qt 6 changed some input event handling, so you might need to adjust the event capturing logic. So the solution is: GridView { id: gridViewNodes anchors.fill: parent cellWidth: 140 cellHeight: 120 clip: true highlightMoveDuration: 100 reuseItems: true // unselect MouseArea { anchors.fill: parent propagateComposedEvents: true onClicked: (mouse) => { gridViewNodes.currentIndex = -1 nodeListMultiSelectionHandler.resetSelection() mouse.accepted = false // allow selection } }
  • 0 Votes
    8 Posts
    1k Views
    H
    The issue was solved Add child model in parent repeater's Compoenet.onCompleted. Repeater { id: repeater1 model: backend.graphModel Component.onCompleted: { repeater2.model = model.GraphMaximumCount } } Repeater { id: repeater2 }
  • This topic is deleted!

    Unsolved
    4
    0 Votes
    4 Posts
    83 Views
  • Keyboard events inside a QQuickPaintedItem/QQuickItem

    3
    0 Votes
    3 Posts
    4k Views
    Q
    you need to call setFlag(ItemAcceptsInputMethod, true);
  • Unqualified access warning on singleton object with QML_NAMED_ELEMENT

    Unsolved
    1
    2 Votes
    1 Posts
    168 Views
    No one has replied
  • Help with Resizable Columns in TableView

    Unsolved
    3
    0 Votes
    3 Posts
    686 Views
    A
    I think this repository can help you. https://github.com/tlaemmlein/TableViewQtQuick2Examples
  • Q_NAMESPACE, Q_ENUM_NS and qmlRegisterUncreatableType

    Solved
    3
    0 Votes
    3 Posts
    270 Views
    DuBuD
    @GrecKo Ah, cool, thank you!
  • qml with QQuickPaintedItem will slow down the ui operation

    Unsolved
    4
    0 Votes
    4 Posts
    253 Views
    Q
    @GrecKo thanks ,i will try video output later, now i use QQuickFramebufferObject.
  • Manage focus between multiple displays on Linux Wayland

    Unsolved
    4
    0 Votes
    4 Posts
    365 Views
    SGaistS
    That's something worth discussing. I currently don't know the details of the Wayland protocols and how to leverage them from Qt for your situation.
  • PySide6-QtQuick & QML problem generating an executable with NUITKA

    Unsolved
    4
    0 Votes
    4 Posts
    574 Views
    SGaistS
    Hi, Which version of PySide6 would that be ? Which version of Nuitka ? On which OS ? Also, while the logs nuitka might mention webengine, are you sure it's actually included ? I did a test on macOS and ended up with a 84MB binary which is not that surprising accounting for the QtQuick stuff plus QtCore and QtGui.