Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.0k Topics 77.3k Posts
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    4 Views
    No one has replied
  • Qmlls.exe not find C++ Custom Types

    Unsolved
    3
    0 Votes
    3 Posts
    322 Views
    K
    @chids This doesn't work for me。 I have restarted qmls.exe and cleared CmakeCache。 [image: 9b3dd312-cc49-4f77-9a3c-32e776e0394f.png]
  • 0 Votes
    1 Posts
    805 Views
    No one has replied
  • propagateComposedEvents for MultiPointTouchArea

    Unsolved
    4
    0 Votes
    4 Posts
    347 Views
    johngodJ
    Hi @therealmatiss Since it is not in the MultiPointTouchArea docs it should not be a bug, maybe it just was not developed for it. You can ask about it in the qt dev mailing list and create a feature request in qt bug report https://bugreports.qt.io/secure/Dashboard.jspa. I am a bit work overloaded right now but when I find the time I will try to check qt code and see if this would be feasible to port.
  • Rounded Image in Qt6

    Solved
    10
    0 Votes
    10 Posts
    5k Views
    J
    To anyone seeing this in the future who has the same problem as me with the jagged edges: The problem seems to actually be caused by the smoothstep that the Qt6 MultiEffect uses but the Qt5 OpacityMask doesn't. This is used for the maskThreshold- and maskSpreadAt- properties of MultiEffect. I don't really understand how these properties work, but by recreating this part of the shader in my own project I found out that if the first two elements of mask are about 0 and 1 respectively, the edges will be smooth. By looking into how these values are calculated, I found that setting maskThresholdMin to 0.5 and maskSpreadAtMin to 1.0 reaches basically this and the edges will then be smooth enough TLDR: Set these values in the MultiEffect: maskThresholdMin: 0.5 maskSpreadAtMin: 1.0 Edit: And just to clarify, layer.smooth: true also has to be set on the mask item
  • QTextDocument cannot size or center images

    Unsolved
    3
    0 Votes
    3 Posts
    235 Views
    F
    Yes, I've tried resizing and centering w/ a parent <div>, parent <table><tr><td align="center"> and many other ways... and it seems to respect any other non-<img> element. There's no defaultStyleSheet on the document and no other HTML/CSS beyond the two <img> components. The images are added as resources like such (same QTextDocument as above): document->addResource(QTextDocument::ImageResource, QUrl("derp://img1.png"), img1); document->addResource(QTextDocument::ImageResource, QUrl("derp://img2.png"), img2); And then setHtml sets the following: <html> <body> <img width="50px" height="50px" src="derp://img1.png"/> <img width="50px" height="50px" src="derp://img2.png"/> </body> I've started putting together a new document w/ QTextCursor, but it'd be nice to just use HTML.
  • "qt.qpa.wayland: Wayland does not support QWindow::requestActivate()"

    Unsolved
    12
    0 Votes
    12 Posts
    9k Views
    JonBJ
    @Scotsgeek Yes, you get that with Qt5.x, Ubuntu 22, Wayland. Nothing you can do about it. It's just a warning, that should not stop you porting 5 to 6. As it happens with Qt6.x, Ubuntu 24, Wayland that message does not appear (though I don't think that means requestActivate() does anything). Still plenty of Wayland issues outside Qt, for my part I have made Ubuntu desktop revert to Xorg.
  • ROS2 Humble with QML

    Solved
    3
    0 Votes
    3 Posts
    396 Views
    R
    My conclusion is don't do this because the cmakes is different in both so try to separete it
  • Qt crashes because of a button background

    Moved
    5
    0 Votes
    5 Posts
    430 Views
    K
    The problem wasn't there at all. It was crashing because of a pie chart
  • 0 Votes
    5 Posts
    471 Views
    JoeCFDJ
    @Deep-Patle Sorry I misread your post. To implement speech-to-text in C++, you can leverage speech recognition APIs or libraries such as Google's Speech-to-Text API, Microsoft Azure Speech API, or open-source libraries like pocketsphinx or deepspeech
  • TextField: "floating" label on top of field

    Moved Unsolved
    2
    0 Votes
    2 Posts
    225 Views
    GrecKoG
    The Qt Quick Controls Material Style implements this for the placeholderText of TextField.
  • Usage of ArcGis to trace vehicle path

    Unsolved
    3
    0 Votes
    3 Posts
    358 Views
    F
    @ldanzinger The link is outdated. Current link: https://github.com/Esri/arcgis-maps-sdk-samples-qt/blob/main/CppSamples/Maps/ShowLocationHistory
  • Qml flickable disable scroll inertia

    Unsolved flickable scrol listview flick smooth
    5
    1 Votes
    5 Posts
    7k Views
    T
    I know it's been a few years, but this might still be helpful to someone :) For me, this approach works: delegate: MyDelegate { MouseArea { id: _mouseArea anchors.fill: parent } Binding { when: _mouseArea.pressed target: _listView property: "interactive" value: false } } With this setup, you should be able to scroll the list view using the scroll wheel. When you perform a press-and-drag gesture, it will disable the scrolling or flicking behavior. Once you release the mouse button, the binding will be restored, making the list view interactive again, so you can scroll with the mouse wheel once more. Even when you have multiple elements (i.e., instantiated delegates), dragging across them won't reset the interactive property until you release the mouse button.
  • How to make round imageas

    Solved
    5
    0 Votes
    5 Posts
    405 Views
    K
    @Markkyboy The whole problem with OpacityMask was QtGraphicalEffects since it is not included in Qt6 but I in a forum I found import Qt5Compat.GraphicalEffects and it now works like following: Rectangle { id: mask anchors.left: parent.left anchors.leftMargin: 15 width: 50 height: 50 radius: 25 clip: true } Image { id: storeIcon anchors.fill: mask source: "qrc:/image.png" fillMode: Image.PreserveAspectCrop layer.enabled: true layer.effect: OpacityMask { maskSource: mask } }
  • How can I keep an element at a 'fixed' position relative to another element?

    Unsolved layout qml
    2
    0 Votes
    2 Posts
    389 Views
    johngodJ
    Don't use anchors for the dot, use a fixed value, something like Image { id: dot width: someWidth height: someHeight x: someXPositionRelativeToXBodyImage y: someYPositionRelativeToYBodyImage ..... }
  • using Shape as Pane background gives 1 pixel white line

    Solved
    5
    0 Votes
    5 Posts
    313 Views
    mzimmersM
    Good to know. I'm running 6.5.3 on Windows 11. Thanks for pointing me in the right direction, though.
  • Is "font.bold: true" equal to "font.weight: Font.Bold" ?

    Solved
    3
    0 Votes
    3 Posts
    218 Views
    R
    @GrecKo Thanks for your reply!
  • 0 Votes
    1 Posts
    326 Views
    No one has replied
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    173 Views
    No one has replied
  • Clip QML MediaPlayer to a round cornered rectangle container?

    Solved
    6
    1 Votes
    6 Posts
    2k Views
    D
    @charlie2024 If you are moving forward with the existing method, no problem. However, for your information, Opacity Mask on Qt6 is now possible from Qt 6.2 onwards using the "Qt5Compat.GraphicalEffect" library. This library contains many graphical effects initially discontinued and later added due to high demand from developers like DropShadow, Gaussian Blur, etc. Here is the link below Qt5Compat GraphicalEffect Happy coding and happy learning :)