Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.0k Topics 77.4k Posts
  • macdeployqt dmg references with links

    Unsolved
    1
    0 Votes
    1 Posts
    90 Views
    No one has replied
  • How to get aggregated scaling factor for QML items?

    Unsolved
    3
    0 Votes
    3 Posts
    218 Views
    A
    Thanks for your reply. I should have been more specific in my question: I know how to write it myself, I was looking for an existing function that already gives the that, akin to QGraphicsItem::sceneTransform. Because how would you expose such a function to QML, so you have it available globally, for all items? I guess that would mean something like a singleton object.
  • Introducing 'Toastify' for QML

    3
    1 Votes
    3 Posts
    310 Views
    aeriqueA
    About the zero dependencies: it is indeed really nice that I just have to drop two files in my project to get nice toast functionality.
  • qml type annotation with local enum

    Unsolved
    3
    0 Votes
    3 Posts
    236 Views
    M
    @Shrishashank thank you very much.
  • custom style for virtual keyboard

    Solved
    8
    0 Votes
    8 Posts
    1k Views
    mzimmersM
    OK, so here's what I needed to do: create a resource file for the custom style. add a prefix: <qresource prefix="/VKeyboardStyles/QtQuick/VirtualKeyboard/Styles/mydefault"> create a folder with the name "mydefault" place my custom style.qml in this folder (along with any custom images I wanted) add this to my main.cpp: qputenv("QT_VIRTUALKEYBOARD_STYLE","mydefault"); I really don't see why this has to be so complicated, but maybe this will help anyone else who's trying to do the same thing. Thanks to everyone who looked.
  • This topic is deleted!

    Unsolved
    2
    0 Votes
    2 Posts
    131 Views
  • FontLoader not loading woff2 format

    Unsolved
    8
    0 Votes
    8 Posts
    562 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
    174 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
    315 Views
    S
    ok thanks
  • Connect cpp signal to qml registered cpp class

    Unsolved
    3
    0 Votes
    3 Posts
    271 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
    280 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
    220 Views
    Tom assoT
    @JonB Oh, that makes total sense! Thanks!
  • QMediaRecorder not record using QVideoFrameInput

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

    Unsolved
    2
    0 Votes
    2 Posts
    202 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
    630 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
    403 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
    206 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);