Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.1k Topics 77.7k Posts
  • How to get the SplitView handles to only adjust the adjacent views?

    Unsolved
    1
    0 Votes
    1 Posts
    170 Views
    No one has replied
  • How to have a button in QML execute a function laid out in Python (PySide6) file?

    Solved
    10
    1 Votes
    10 Posts
    3k Views
    I
    Okay, so now I know that I can ignore things like "Unqualified access" when it comes to something like this. But, now I'm facing a new problem: I cannot get the LEDs to do anything. I've tested them with a simple script to ensure they do work, and they do. So, there's something going on with my project's code somewhere that is causing them to not work correctly. I've included print statements which do show up, just not the lights. I think I'll be better off making a simple QML and Python setup to test a basic light animation and see what's going on.
  • How to create QML singleton

    Unsolved
    17
    0 Votes
    17 Posts
    3k Views
    K
    @Mesrine I run the application directly from Qt Creator after building it. Moving set_source_files_properties did not help, the problem is the same. Bug report created https://bugreports.qt.io/browse/QTBUG-121758
  • Unable to get selection in TreeView to work in QML/QT6.6.1

    Solved
    3
    0 Votes
    3 Posts
    564 Views
    B
    @jarle said in Unable to get selection in TreeView to work in QML/QT6.6.1: I also found no way to get the QItemIndex for an element when it's rendered Did you try using the index property that is exposed to delegates or was that not suitable for what you needed? BTW, I haven't tried the new Qt 6 TreeView yet (I'm still on Qt 5 and the old, deprecated TreeView) but I will have to migrate soon so questions like yours are interesting to me.
  • DragHandler gives incorrect Translation values

    Unsolved
    1
    0 Votes
    1 Posts
    201 Views
    No one has replied
  • QML - SpinBox - Data validation

    Unsolved
    3
    0 Votes
    3 Posts
    334 Views
    GrecKoG
    To add a suffix in a SpinBox or a TextField I generally don't add it in the text directly but create a new Label as the child of the contentItem, and adjust the rightPadding accordingly. I think this could help you here, your actual text would then be digits only.
  • Does startSystemResize() work on MacOS?

    Unsolved
    1
    0 Votes
    1 Posts
    226 Views
    No one has replied
  • Images in GridView re-caching on filtering

    Unsolved gridview model image filtering caching
    3
    0 Votes
    3 Posts
    587 Views
    S0ulM1keS
    @GrecKo the problem is, that GridView releases it delegates when model's elements is removed. It provokes Image to reload if delegate is shown again. No meter if I set cache: true Such a shame that GridView don't have reuseItems like ListView I've come with next decision. I've created Repeater containing Image that use source model. GridView's delegate Image use Repeater's function itemAt() giving delegate's index after mapping to source model: //Image in deleagte Image { Component.onCompleted: { source = appModelImages.loadImage(appFilterModel.mapRowToSource(parent.delegateIndex)) // custom implementation } ... } //Repeater Repeater { id: appModelImages visible: false function loadImage(index){ return itemAt(index).source } model: AppModel delegate: Image { visible: false asynchronous: true source: model.boxart } } This may be not the best decision, but "faster" than create own delegate pool for GridView. Didn't see any examples of implementing mechanism like this. Repeater should work fine, as it relays on source model. And as I expected, images live when source model does.
  • Text message not displaying in qml

    Unsolved
    10
    0 Votes
    10 Posts
    1k Views
    B
    @GrecKo agreed that that is a cleaner way to do it, but it doesn't help the OP understand where they went wrong with anchors.
  • Thoroughly confused by QTableView documentation

    Unsolved
    3
    0 Votes
    3 Posts
    605 Views
    M
    @jgerber All i want to say is.: Thank you. Your solution worked perfectly, and for the love of god i couldn't find other correct solution online.
  • How to disable mouse events for LineSeries?

    Unsolved qt6.5 qml qcharts chartview
    1
    0 Votes
    1 Posts
    279 Views
    No one has replied
  • qt_add_big_resources not producing promissed .o file

    Unsolved
    6
    0 Votes
    6 Posts
    1k Views
    M
    Since I'm not allowed to attach files here, I've uploaded it to Google. Hope that works: https://drive.google.com/file/d/1zcEmt09gpg8CxYdbvb1oW_P3tbc1LHxF/view?usp=drive_link
  • multiwindow scenegraph couldn't render correct

    Unsolved
    1
    0 Votes
    1 Posts
    172 Views
    No one has replied
  • Button property undefined

    Unsolved
    4
    0 Votes
    4 Posts
    378 Views
    JoeCFDJ
    @nixako2186 Since your code runs, this means you can override it. However, you may lose control over when your local enabled or the one defined in Button is used. Therefore, better never do it.
  • How to make FileDialog(Qt Quick) can be dropped and dragged on MacOS

    Unsolved
    2
    0 Votes
    2 Posts
    204 Views
    SGaistS
    Hi and welcome to devnet, If memory serves well, you should have a file dialog that is shown as a drawer which is an integral part of the application window. That's usual on macOS for modal dialogs.
  • MessageDialog not showing when I validate a condition in the TableView

    Unsolved
    1
    0 Votes
    1 Posts
    126 Views
    No one has replied
  • 0 Votes
    3 Posts
    264 Views
    I
    @JoeCFD No. I guess I should've specifically mentioned that I also looked into the Button group documentation (although I did originally talk about how AbstractButton and Exclusive, which are part of the Button group, will not work for me). Also, trying to make them as buttons completely screws up my entire layout for everything and I can never find helpful answers as to why, but that's a different subject for another time. All I want to know is if it is possible with my current setup. If yes, how do I go about it? If no, why? . . . UPDATE: I found out that it is indeed possible, and it was incredibly simple! All I had to do was include some additional onClicked handlers to set the states of the other buttons to off. Before: MouseArea { anchors.fill: parent onClicked: leftSignal.buttonState = (leftSignal.buttonState === 'on') ? 'off' : 'on'; } After: MouseArea { anchors.fill: parent onClicked: { rightSignal.buttonState = 'off'; brakeLights.buttonState = 'off'; parkingLights.buttonState = 'off'; leftSignal.buttonState = (leftSignal.buttonState === 'on') ? 'off' : 'on'; } }
  • 0 Votes
    6 Posts
    5k Views
    M
    @afalsa same here
  • Is MessageDialog broken in Qt 6.5?

    Unsolved
    2
    0 Votes
    2 Posts
    270 Views
    R
    Okay, after reading through the source code for qquickmessagedialog.cpp, I saw a use-case for supporting different buttons. I added the following: onButtonClicked: function (button, role) { switch (button) { case MessageDialog.Ok: exportDialog.close() break; } } Apparently, without this and explicitly telling the dialog to close, you can't reopen the message dialog. Seems goofy to me.
  • Difficulty Connecting Data to Components in Qt Car Dashboard Project

    Unsolved
    5
    0 Votes
    5 Posts
    584 Views
    A
    @JoeCFD Thank you