Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
19.8k Topics 76.6k Posts
  • 0 Votes
    5 Posts
    211 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
    136 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
    223 Views
    F

    @ldanzinger The link is outdated. Current link: https://github.com/Esri/arcgis-maps-sdk-samples-qt/blob/main/CppSamples/Maps/ShowLocationHistory

  • 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
    237 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 } }
  • 0 Votes
    2 Posts
    190 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
    185 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
    125 Views
    R

    @GrecKo Thanks for your reply!

  • 0 Votes
    1 Posts
    152 Views
    No one has replied
  • QML: anchoring the zoom to cursor location

    Unsolved
    1
    0 Votes
    1 Posts
    109 Views
    No one has replied
  • 1 Votes
    6 Posts
    1k 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 :)

  • Choosing a directory using FileDialog

    Unsolved
    2
    0 Votes
    2 Posts
    143 Views
    dheerendraD

    It is not giving the option to select the directory. "Save" button will not be enabled unless there some text exist in the "Save As:". As a work-around type the FolderName you want in the "Save As". Save button will be enable. Now if you click on the save button, directory you entered will be set to selectedFile property.

    console.log(" File Selected.......folder.."+fileDialogOutput.selectedFile)

    According to the documentation, there is no mention of directory selection. However 5.15.x FileDialog does mention the directory selection. I see FileDialog disparity between Qt 5.15.x to 6.x. I will file a enhancement bug for this.

  • 0 Votes
    5 Posts
    241 Views
    dheerendraD

    @Mewo Also move the ticket solved

  • populate() not working Repeater

    Unsolved
    9
    0 Votes
    9 Posts
    414 Views
    T

    Hello everybody,

    I'm overlucky: I found the error for myself (-:

    The correct code line is now:

    emit dataChanged(index(0),index(nparticles-1));

    instead of

    emit dataChanged(index(0),index(nparticles));

    Now I can start working!

    Thanks to all!

    Tobias

  • 0 Votes
    2 Posts
    159 Views
    nicwainwrightN

    SOLVED thanks to a previous forum post regarding using MultiEffect on Image{} type component

    All that's required is to set VectorImage's visible to false, since the compositor seems to be double rendering, I suppose, creating the unwanted outline of the SVG

    Thanks to 6.5 article: https://forum.qt.io/topic/144070/qt6-color-svg-using-multieffect/3
    and member: https://forum.qt.io/user/mzimmers

    New graphics:
    3f636858-1079-499b-9803-afcd8b926c3c-image.png

    WORKING CODE:

    Item { id: root color: <input from higher level> source: <input from higher> VectorImage { id: mySVG ~~~~ same lines from above ~~~~~ visible: false <======== DONT FORGET THIS } MultiEffect { id: colorOverlay source: mySVG anchors.fill: mySVG colorization: 1.0 // opacity equivalent colorizationColor: root.color } }
  • QML module Imports Not Found by IDE

    Solved
    18
    0 Votes
    18 Posts
    2k Views
    L

    @SimpleY i ve got same problem as your, try to go to preferences->Qt Quick->QML/JS editing-> QML Language server and remove tick on Tun on (leave all unchecked)

    it worked for me.

  • 0 Votes
    9 Posts
    474 Views
    S

    QScrollArea has a method ensureWidgetVisible() which seems to be missing from Flickable. StackOverflow had a discussion on this: https://stackoverflow.com/questions/45946637/how-to-make-flickable-ensure-the-visibility-of-an-item-inside-of-it. (I'm not a user of QML, but this might provide a different way of tackling the problem.)

  • Multiple device application in QML

    Unsolved
    7
    0 Votes
    7 Posts
    433 Views
    R

    @johngod This is a great reference. I will check the code and compare what I am doing wrrong here.
    Thank you so much.

  • Image centering in QML TextArea not working

    Unsolved
    6
    0 Votes
    6 Posts
    281 Views
    mzimmersM

    It isn't that TextArea isn't able to "handle" Images; you can indeed place images within a TextArea and control their location. The problem is, your image is embedded in the text property of the TextArea. I've never seen this done before, but I think you'd have to use HTML/CSS constructs within the <img> in order to do anything (and I'm not sure this will work).

  • Can't build Qt6 from sources: invalid synax of QML modules

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