Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.0k Topics 77.4k Posts
  • how to use QML ListModel in C++?

    Unsolved
    7
    0 Votes
    7 Posts
    877 Views
    mzimmersM
    @flaudio I could do that, but I greatly want to keep that second parameter a QVariant. This function is eventually going to be used for a variety of purposes, and I'll need to convert that argument to several different things.
  • How to add animation to Canvas for multiple dynamic corrdinates

    Unsolved
    2
    0 Votes
    2 Posts
    236 Views
    F
    Hi @KeshavJ, I don't think that there are other ways to use animation in canvas. Using canvas you can handle pixel by pixel movement using a Timer (very ugly alternative). Instead of using canvas, have you tried a Shape component? It could be a valid alternative. Advantages: use declarative programming (real qml power) and higher performance (test with a qml profiler). Disadvantages: less flexible (i.e. fixed number of points to draw).
  • When I pass the code to Windows the icons are black and white

    Moved Solved
    12
    0 Votes
    12 Posts
    1k Views
    GrecKoG
    In some Qt Quick Controls styles the icon are rendered in monochrome. Linux has a different default style than window.
  • Needle trailing color/glow effect using Shader Effect on Qt6 QML

    Solved
    3
    0 Votes
    3 Posts
    365 Views
    D
    Yea exactly @Lord_Naikon thank you for your support I just made two uniform buf with same set of data as mentioned now its working. Thank you soo much
  • show scrollbar by default - ScrollView

    Solved
    3
    0 Votes
    3 Posts
    491 Views
    A
    could u add the example code for this
  • I want to see map with cmake, qml. But it's not working

    Solved
    6
    0 Votes
    6 Posts
    549 Views
    D
    MinGW perfectly works now !!!! If anyone moving MSVC->MinGW you should check project cmake's "Current Configuration". which would be set to C:/Qt/5.15.2/msvc2019_64/ ~~~. It must be changed to C:/Qt/5.15.2/mingw81_64/~~~ And in QML file, Map field should have "achors.fill: parent" All fixed well. super thanks to @SGaist you saved my life
  • how to cause view to update based on model change?

    Solved
    31
    0 Votes
    31 Posts
    5k Views
    mzimmersM
    Thanks for all the help, guys. I was able to get this working like so: GridView { required property Space space property var spaceFeatureList: sceneModel.featureUuidList(false, space.uuid) ListModel { id: spaceFeatureListModel } Component.onCompleted: { spaceFeatureListModel.clear() for (var i = 0; i < spaceFeatureList.length; i++) { spaceFeatureListModel.append({ "uuid": spaceFeatureList[i] }) } } model: spaceFeatureListModel Connections { target: sceneSetupPane function onFeatureListChanged(spaceId, activityId, status) { if (spaceId.localeCompare(space.uuid) === 0) { if (status) { var i for (i = 0; i < spaceFeatureListModel.count; i++) { if (spaceFeatureListModel.get(i).uuid === activityId) { break } } if (i >= spaceFeatureListModel.count) { spaceFeatureListModel.append({ "uuid": activityId }) } } else { for (i = 0; i < spaceFeatureListModel.count; i++) { if (spaceFeatureListModel.get(i).uuid === activityId) { spaceFeatureListModel.remove(i) break } } } } } } The function could probably use some optimizing, but it works. Thanks again.
  • LineSeries in ChartView only visible on my machine with OpenGL enabled

    Unsolved
    6
    0 Votes
    6 Posts
    676 Views
    SGaistS
    IIRC, the app version and driver version might not be linked. As for Qt Graph, AFAIK, the goal is for it to replace Qt Charts in an improved way but I haven't had the occasion to use it yet so I am sorry I can't be of more use on that front.
  • How to click (pick) a 3D object?

    Unsolved
    3
    0 Votes
    3 Posts
    297 Views
    Anton1978A
    the question is resolved - you can delete it, the problem is that for some reason the model 3d inside Node does not respond to clicks. I will find out why.
  • QtWebEngineProcess stays alive after QML scene destruction

    Unsolved
    4
    1 Votes
    4 Posts
    360 Views
    No one has replied
  • Delegate creation and multithreaded property updating

    Solved
    47
    0 Votes
    47 Posts
    9k Views
    A
    I prefer less logic in when I call a function, and more logic where the function simply exits when some parameters are still missing, but that's a...philosophical difference.
  • GammaRay and secondary windows

    Unsolved
    2
    0 Votes
    2 Posts
    209 Views
    SGaistS
    Hi, I think that's a question better asked directly to the GammaRay authors
  • Android emulator blank screen and 0x502 error

    Unsolved
    10
    1 Votes
    10 Posts
    4k Views
    M
    I don't know whats happened. But after trying today, the problem perished. Maybe an sdk update did it. Don't hope it will get back. Problem solved for now.
  • This topic is deleted!

    Solved
    1
    0 Votes
    1 Posts
    16 Views
    No one has replied
  • Progressbar only shows single color

    Unsolved
    5
    0 Votes
    5 Posts
    519 Views
    R
    I think that you need to set padding in ProgressBar: ProgressBar { id: progressBar width: parent.width / 2 height: 50 anchors.horizontalCenter: parent.horizontalCenter anchors.bottom: parent.bottom anchors.bottomMargin: parent.width / 2 value: 0.3 // 30% progress padding: 5
  • How to handle mouse event in overlapped mouse areas in qml

    Solved
    5
    0 Votes
    5 Posts
    568 Views
    JoeCFDJ
    Replaced Rectangle with Button. The status button works now. But the issue is not solved. Mark this as solved for now and will revisit this problem later.
  • Declaring window manager hints 🪟

    Unsolved
    1
    0 Votes
    1 Posts
    123 Views
    No one has replied
  • 0 Votes
    6 Posts
    554 Views
    H
    @JonB Hello my dear! Using the QML profiler, I was able to identify the origin of the problem. I currently have 3 js files: app.js, main.js and countries.js. The main.js file contains my main js functions. The countries.js file should contain the list of countries in a constant and functions to manipulate them. I import all my js files into app.js. The countries.js file was recently added. While I was working there, I had an emergency. So I stopped the work by leaving in countries.js an empty array const and a function that does nothing. const list = []; function func() { } This is what was causing the problem. I just commented out the countries.js import statement in app.js and it fixed the problem. Thanks for the guidance.
  • TextField::inputMethodHints no longer works as expected in QT 6.7.2

    Unsolved
    2
    1 Votes
    2 Posts
    252 Views
    A
    Hi, there's a bug in Qt 6.7.1 and 6.7.2 related to what you're experiencing: inputMethodHints are being ignored in Android. Lucky it's fixed in Qt 6.7.3 and 6.8 :) https://bugreports.qt.io/browse/QTBUG-125410
  • Different result when I try to make a QML example

    Unsolved
    3
    0 Votes
    3 Posts
    274 Views
    E
    @Markkyboy My QtCreator version is 10.0.1 based on Qt 6.4.3 (Windows) Designer is not a part of QtCreator I enabled QtQuick plugin I am unable to access your Github at any time, Try again, there's an issue with github. At least I want to understand why the progress bar doesn't work, it's crazy !