Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.1k Topics 77.6k Posts
  • kde integration

    Unsolved
    4
    0 Votes
    4 Posts
    398 Views
    RokeJulianLockhartR
    I thought seetings "Breeze" would change QQuickControls aspect but I think I'm wrong. @Jim-Gir, yeah: print( "Current QQuickStyle: ", PySide6.QtQuickControls2.QQuickStyle.name() ) PySide6.QtQuickControls2.QQuickStyle.setStyle("Breeze") print( "Current QQuickStyle: ", PySide6.QtQuickControls2.QQuickStyle.name() ) ...returns "Fusion", then "Breeze", yet the controls appear identical regardless, despite them being quite different styles: Fusion Breeze [image: 441c28d5-597c-45c4-abce-c2b44c341273.png] [image: 057417eb-1519-4126-88fb-290f22823792.png] Perhaps, ask at discuss.kde.org/t/1240, or a new thread on that instance? Environment Operating System: Fedora Linux 42 KDE Plasma Version: 6.4.4 KDE Frameworks Version: 6.17.0 Qt Version: 6.9.1 Kernel Version: 6.15.9-201.fc42.x86_64 (64-bit) Graphics Platform: Wayland
  • How to implement multiple actions on onClicked [SOLVED]

    mousearea qml signal
    6
    1 Votes
    6 Posts
    5k Views
    RokeJulianLockhartR
    @sosun, seems you've still not marked it. It works for me in Qt 6, and I almost missed it when I stumbled upon this seemingly-unsolved thread.
  • 0 Votes
    10 Posts
    4k Views
    RokeJulianLockhartR
    @JKSH, turns out that I've been through this before, per post/820589. My sincere apologies. How I wish documentation online would cease to cite qml. qml-qt6 ./main.qml works perfectly: [image: 50c9da2f-cc8b-454d-a021-663ac87dec61.png]
  • Best Approach for Displaying Multiple Camera Streams in Qt 6.9.1 with Microservices

    Unsolved
    2
    0 Votes
    2 Posts
    15 Views
    SGaistS
    Hi, What are the specs of the streams ? Is there are a particular need to convert them to jpeg ? How are you doing that conversion ? What is the target OS to run that application ?
  • How to add icon to button?

    Solved
    10
    1 Votes
    10 Posts
    12k Views
    RokeJulianLockhartR
    You can simply set iconName to the the name the icon has in the theme and use iconSource as a fallback. Can anyone provide an example for this? I also want to utilise the system icons, if possible.
  • Resize window to content

    Unsolved
    3
    1 Votes
    3 Posts
    2k Views
    RokeJulianLockhartR
    @KillerSmath, it doesn't for me (versionlessly): [image: 76ffee03-5032-44ac-8fcd-c40f65666fa0.png] If it did, I doubt that stackoverflow.com/questions/45066601 would have been asked (I doubt it's a failure of my compositor).
  • How can I space QML elements based upon text size?

    Solved
    7
    0 Votes
    7 Posts
    71 Views
    RokeJulianLockhartR
    @JKSH, thank you! That provides a direct answer, of which spacing: fontMetrics.averageCharacterWidth appears to be the most general-purpose solution. I'm surprised that the default spacing value is 0 for so many elements, though. Perhaps, KDE's QQuickStyle lacks defaults that it should provide? Regardless, is this generally how spacing is conducted in QML? If so (which I expect), I'll presume that there's some guidance documented about when/where one should utilise such values?
  • 0 Votes
    2 Posts
    34 Views
    JKSHJ
    Hi, and welcome! @Morty56 said in About the position of engine->rootContext()->setContextProperty() and engine->load() resulting SEGFAULT: What I've done is just move one method to another by integrating two functions to resolve this issue. Nothing else has changed. Here is my code. Which part could bring the result of segmentation fault? I am so confused. Your code could contain a race condition, where moving functions around changes the outcome of the race. Check your code using tools like ASan and TSan.
  • Sudden QML system issues not solved by reinstall

    Unsolved
    9
    0 Votes
    9 Posts
    186 Views
    JKSHJ
    @SanderVc said in Sudden QML system issues not solved by reinstall: qrc:/qt/qml/org/kde/breeze/impl/Theme.qml:10 QtObject is not a type Looks like your project incorporates external KDE types. How do you add them to your project? Please show us your *.pro/CMakeLists.txt file where this happens. For further debugging, set the environment variable, QML_IMPORT_TRACE=1 before launching your app.
  • QT 5.10 Expected token `numeric literal' bug

    Solved
    5
    0 Votes
    5 Posts
    6k Views
    RokeJulianLockhartR
    @aurora_ns, your thread is inaccessible to me. As post/824859 explains, qmlscene does not support the shebang. At least, not #!/usr/bin/env -S qml. Removing that remediated that error for me (although merely resurfaced post/830428). If the error is prepended with :1, it should for you.
  • Mitigate "Variable Delegate Size" issue in ListView

    Unsolved
    1
    0 Votes
    1 Posts
    13 Views
    No one has replied
  • ScrollView vs Flickable

    Unsolved
    2
    1 Votes
    2 Posts
    315 Views
    RokeJulianLockhartR
    @MohsenNz, ListView appears to inherit from Flickable, which ScrollView appears to extend: ScrollView provides scrolling for user-defined content. It can be used to either replace a Flickable, or to decorate an existing one. As of Qt-6.0, ScrollView automatically clips its contents if you don't use a Flickable as a child. If this is not wanted, you can set your own Flickable as a child, and control the clip property on the Flickable explicitly. Consequently, their usage isn't 1:1. However, I don't understand what their uses are.
  • When to use ScrollView instead of Flickable + ScrollBar

    Solved scrollview flickable
    2
    1 Votes
    2 Posts
    488 Views
    RokeJulianLockhartR
    @Jkimmy, perhaps follow post/557344. It's a year older, so if anyone does ever respond, it'll be there.
  • This topic is deleted!

    1
    0 Votes
    1 Posts
    5 Views
    No one has replied
  • Map - api key requared

    Solved
    3
    0 Votes
    3 Posts
    39 Views
    SGaistS
    @Mihaill hi, It would be nice to also post here the code you used to fix your issue in case the video is taken down.
  • SVG not supported in iOS app built using CMake

    Unsolved
    2
    0 Votes
    2 Posts
    26 Views
    SGaistS
    Hi, Are you using a static build of Qt ? If not, did you deploy the corresponding plugin and library along your application ?
  • Identical Code in Multiple Signal Handlers Causes Silent Failure

    Unsolved
    2
    0 Votes
    2 Posts
    36 Views
    W
    [image: b3140f50-9678-499a-8257-7bffe2cbd200.png] [image: 7f4a47e0-cccc-4b09-b11a-20ae23c69ef9.png] If the code within the signal handler is the same, the program can be compiled but it will fail to run and even cannot be debugged.
  • How can I make a QML module visible to other QML files?

    Unsolved
    5
    0 Votes
    5 Posts
    119 Views
    serkan_trS
    @JKSH Thank you for your response. I will try the qt_add_qml_module() function, and if it works, I will get back to you
  • 1 Votes
    1 Posts
    20 Views
    No one has replied
  • How to get new parent, when DragHandler is used ?

    Unsolved
    2
    0 Votes
    2 Posts
    143 Views
    Axel SpoerlA
    Since items can only be dropped on a drop area, just connect to all drop areas' dropped signal. The signal is emitted with a drag event argument, from which you can establish the source, e.g. the dragged object. Have in mind though, that a drop doesn't cause reparenting automatically. So technically, there is no new parent, unless the app sets it explicitly.