Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.2k Topics 78.1k Posts
  • MediaPlayer does not receive stream metadata.

    Unsolved mediaplayer bug
    10
    0 Votes
    10 Posts
    2k Views
    Niclas EisenhutN
    I also tested Qt 6.4.3 because you mentioned As Qt 6.5 switched the multimedia backend to ffmpeg, in which I got Key [7] (Publisher) = HIT RADIO FFH, so the Station Name is mapped, but the Song Title (StreamTitle) is still missing I used Debian 13 btw
  • Popup Qt Quick event handler issue

    Unsolved
    2
    0 Votes
    2 Posts
    50 Views
    mzimmersM
    I'm not sure what behavior you expect, but I think you want to disable hovered behavior on the first popup button while the second popup is up. If that's true, here's your code rewritten into a full QML page (I also added a Loader example to give you an idea of an alternative implementation). If I understand your requirement, this works for me. import QtQuick import QtQuick.Controls Window { width: 640 height: 480 visible: true Component.onCompleted: { loader.item.open() } Loader { id: loader sourceComponent: popupComponent } Popup { id: popup1 width: 100 height: 100 x: 100 y: 100 padding: 0 modal: true focus: true contentItem: Rectangle { id: popup1Container Button { id: btn1 anchors.fill: parent background: Rectangle { color: btn1.hovered ? "red" : "green" } onClicked: popup2.open() } } } Popup { id: popup2 width: 100 height: 100 padding: 0 closePolicy: Popup.NoAutoClose x: popup1.x + popup1.width y: popup1.y + popup1.height modal: true focus: true contentItem: Rectangle { id: popup2Container height: 100 width: 100 Button { id: btn2 anchors.fill: parent background: Rectangle { color: "yellow" } onClicked: popup2.close() Text { text: "Close" anchors.centerIn: parent } } } } Component { id: popupComponent Popup { width: 100 height: 100 modal: true focus: true background: Rectangle { id: popupContainer color: "blue" TapHandler { onTapped: popup1.open() } } } } }
  • Force QQuickWindow update

    Unsolved
    8
    0 Votes
    8 Posts
    140 Views
    F
    I googled a bit and i was expecting this answer, that's why i explained in the first few sentences, that i use threads wherever possible. I use about 10 at start up, reading databases, parsing large files (200MB) and so on. It would probably take minutes without... But some operations just have to be completed before i start these threads and they just have to take place in the gui thread. This is what i would have said, but... Oh, damn, i just realized that it IS avoidable... Some time ago, i tried to create my backend stuff in a separate thread, but these things have to live in the gui thread. Which doesn't necessarily mean, that they have to be created there! I'll create them in a thread and just push them to the gui thread with moveToThread! Oh, man, sorry... So, in the end, i might really be able to avoid any tiny blocking of the gui! Although, i hope, the move operation will not slow down the start up... @jeremy_k Scheduling with a timer would work pretty similar to forceUpdateSlow(), or not? It "slices" the process into chunks and gives the gui 5ms to update in between. Thanks for the hint with the user input! But in my case (2-3 seconds) it wouldn't be necessary, it might even be a feature. ;) @AnttiK With progress i meant just the text you see, nothing else, sorry for the unclearness. Just 2 or 3 single messages. Thank you very much, your code and "pointer to the QML engine" finally lead me to the solution. I will do so! Thank you very much! Btw: Great radio project! Makes me want to try it! :) My program is a music player... But, i am still pretty surprised, that there is no way to do such a forceUpdate(). I tried, for example, to use ShaderEffectSource.scheduleUpdate() for an item, that i need to remove from the qml scene for about 200ms. But this will render the next frame. So, how do i know, when the item can be removed? Same problem. I ended up using the live flag, which i can set to false and remove the item immediately. But this will render the item unnecessarily to a texture all the time...
  • Need help on Quaternion.lookAt (NaN output)

    Unsolved
    8
    1 Votes
    8 Posts
    371 Views
    F
    Almost forgot to paste the qtbug: https://qt-project.atlassian.net/browse/QTBUG-143886 Seems they put it to Critical P1.
  • 1 Votes
    4 Posts
    290 Views
    SGaistS
    @AnttiK said in With Qt 6.10.1 and CMake, configuring a simple QML application fails when source code is in a folder with whitespaces: I'm afraid I'm not too familiar with the Qt sources and how they're organized so I'm far from certain whether my pull request or suggestion would even be considered. Don't be, every contributor had to start somewhere. It does not require a big complicated patch to get on the train :-)
  • Mitigate "Variable Delegate Size" issue in ListView

    Unsolved
    3
    0 Votes
    3 Posts
    583 Views
    GrecKoG
    If you know how to calculate the total of your delegates' height, you might want to handle the ScrollBar yourself and set its size and position manually. The position might be trickier to compute.
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    5 Views
    No one has replied
  • How to trigger a QQuickFramebufferObject repaint?

    Solved
    6
    0 Votes
    6 Posts
    216 Views
    K
    I don't know why I though update() was a method of the FBO::Renderer. I changed it now, and I'm having the same issue. Image gets temporarily rendered when resizing the widget, and then goes back to blank. EDIT: Oh, actually, it was my own fault. Was calling canvas->flush() which deletes the canvas after drawing. :facepalm:
  • Why did "useOpenGL" not work?

    Unsolved
    10
    0 Votes
    10 Posts
    693 Views
    F
    @JKSH Oh that definitely sounds good
  • Need guide on modifying Qt modules

    Unsolved
    6
    0 Votes
    6 Posts
    166 Views
    JKSHJ
    @FishBoneEK said in Need guide on modifying Qt modules: @SGaist I'm considering adding gaps in LineSeries of QtGraphs (with qQNaN() perhaps), instead of using multiple LineSeries. OK, so this is a continuation of https://forum.qt.io/post/836004 As mentioned there, this feature is coming to Qt 6.11 (currently downloadable as a beta) -- please give that a try before editing Qt.
  • My CharacterController won't fall

    Solved
    3
    0 Votes
    3 Posts
    111 Views
    S
    Slightly off-topic: Maybe it's a typo, but Earth's gravity is 9.81 and not 9.18.
  • qml type annotation with local enum

    Unsolved
    4
    0 Votes
    4 Posts
    510 Views
    R
    https://doc.qt.io/qt-6/qtqml-javascript-hostenvironment.html#type-annotations-and-assertions It says: Note: In QML, enumerations are not types and can therefore not be used as type annotations. Their underlying numeric type, int or double, should be used instead.
  • QGraphsView How to get mouse events

    Unsolved
    2
    0 Votes
    2 Posts
    95 Views
    GrecKoG
    Have you tried a HoverHandler?
  • Wheel Event direction changing when pressing Alt key

    Unsolved qml mousescroll mouse event mousearea
    2
    0 Votes
    2 Posts
    931 Views
    W
    This behaviour is still not documented (Qt Bug Tracker). The special modifier handling is implemented in QWindowsPointerHandler::translateMouseWheelEvent. A WM_MOUSEWHEEL event is treated like a WM_MOUSEHWHEEL event: const QPoint angleDelta = (msg.message == WM_MOUSEHWHEEL || (keyModifiers & Qt::AltModifier)) ? QPoint(delta, 0) : QPoint(0, delta);
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    22 Views
    No one has replied
  • QtGraphs LineSeries onClicked signal gives integer coordinates?

    Unsolved
    1
    0 Votes
    1 Posts
    50 Views
    No one has replied
  • Bind to another model's data in a delegate

    Unsolved
    18
    0 Votes
    18 Posts
    860 Views
    jeremy_kJ
    @ECEC said in Bind to another model's data in a delegate: @jeremy_k , A proxy model can only have one source though, so surely this would still require connecting to model B's dataChanged to be aware of relevant changes (i.e units changed)? QAbstractProxyModel::setSourceModel() only accepts one model. That doesn't mean that a proxy must use or limit itself to this interface.
  • Possible memory leak of gradient animation

    Unsolved
    15
    0 Votes
    15 Posts
    2k Views
    SeeLookS
    @petero3 Thanks for the update. Because we have to stick to older Qt version I found workaround to use QQuickPaintedItem. Visually it gives me the same effect and CPU impact (if any) is bearable. ... only hands were dirty :-)
  • The keyboard was not shown although the Text Input focused on Android 16

    Unsolved
    2
    0 Votes
    2 Posts
    106 Views
    jsulmJ
    @huy2910 Any reason not to use more recent Qt version? Especially when using most recent Android version.
  • This topic is deleted!

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