Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.1k Topics 77.7k Posts
  • ScrollView vs Flickable

    Unsolved 22 Oct 2019, 10:59
    1 Votes
    2 Posts
    1k Views
    @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.
  • 1 Votes
    2 Posts
    1k Views
    @Jkimmy, perhaps follow post/557344. It's a year older, so if anyone does ever respond, it'll be there.
  • This topic is deleted!

    28 days ago
    0 Votes
    1 Posts
    5 Views
    No one has replied
  • SVG not supported in iOS app built using CMake

    Unsolved 29 days ago
    0 Votes
    2 Posts
    161 Views
    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 29 days ago
    0 Votes
    2 Posts
    427 Views
    [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 15 Aug 2025, 11:39
    0 Votes
    5 Posts
    677 Views
    @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
    154 Views
    No one has replied
  • How to get new parent, when DragHandler is used ?

    Unsolved 15 Aug 2025, 16:27
    0 Votes
    2 Posts
    253 Views
    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.
  • 0 Votes
    8 Posts
    619 Views
    @DoktorNik Thanks for sharing your workaround. I'm glad to hear that you got it working. Thanks also for writing up a detailed bug report: https://bugreports.qt.io/browse/QTBUG-139233 It looks like the "Fix Version(s)" field for QTBUG-138391 was incorrect, and Qt 6.10.0-beta2 still contains the bug. You should be able to remove your workaround once Qt 6.9.2 or 6.10.0 are released.
  • This topic is deleted!

    Unsolved 15 Aug 2025, 09:40
    0 Votes
    1 Posts
    9 Views
    No one has replied
  • 0 Votes
    4 Posts
    345 Views
    @Bob64 said in How to make GridView with special zone , which would be free of delegates ?: The only possibly relevant thing I can see in the documentation is the footer property, but it seems that that would position the footer item at the end of, but outside, the grid area. My understanding of what is needed here is a special item fixed at the the bottom right corner of the grid area, within the grid area. It seems like this would be a tricky one to solve. If a dummy item is added at the end of the model, it is not going to be in a fixed position. On the other hand, if something is overlaid on top of the grid area, the grid layout will not know about it and will not try to avoid it. My expectation probably is too much. Using of usual footer is a way(not best because it will be in not grid area). Also i can use model customization in order always to have last delegate as dummy delegate with combination of overlaid Item on top of grid area. Qt: 6.9
  • In Loader don't work item.height

    Unsolved 14 Aug 2025, 09:46
    0 Votes
    3 Posts
    173 Views
    It's source: Rectangle { id: confItemsList height: 200 ............ It's loader: Loader { id: loader width: parent.width height: status === Loader.Ready ? item.height : 0 And loader get height 0
  • 1 Votes
    4 Posts
    1k Views
    Hello. I encountered the same problem, found a solution. It's all about "qrc:/qt/qml". The search for the path "QtQuick/VirtualKeyboard/Styles" starts from there. Accordingly, if you created a resource file not in the root of the application, then you need to add the prefix "/qt/qml/" in the resource file to the directory to your keyboard style. Final structure (using my example): [image: 809f17e6-f89f-4c0f-b67c-92eaddae5718.png] Main.cpp: int main(int argc, char *argv[]) { qputenv("QT_IM_MODULE", QByteArray("qtvirtualkeyboard")); qputenv("QT_VIRTUALKEYBOARD_STYLE", QByteArray("MXTS")); //Just style name, but before create QML engine! J QApplication app(argc, argv); ModelStorage* model = ModelStorage::instance(); QQmlApplicationEngine engine; qDebug() << engine.importPathList(); // for exmaple: QList("C:/git/Torque_sub/TorqueSub/build/Desktop_Qt_6_8_2_MSVC2022_64bit-Debug", "qrc:/qt-project.org/imports", !!!!!"qrc:/qt/qml"!!!!!, "C:/Qt/6.8.2/msvc2022_64/qml") Style.qml: ...... keyboardBackground: Rectangle { color: "red" } ...... Results: [image: f1467529-5950-4066-a296-51f9fe57c507.png] Ref. from src virtual keyboard qt git src: QString stylePath(const QString &name) const { if (name.isEmpty()) return QString(); QStringList stylePathList; stylePathList << QLatin1String("qrc:/qt-project.org/imports/QtQuick/VirtualKeyboard/Styles/Builtin/"); //###### default styles const QStringList importPathList = qmlImportPathList(); //###### get import paths lists // Add QML import path (Note: the QML base dir is usually the last entry in the list) for (int i = importPathList.size() - 1; i >= 0; --i) { const QString stylesPath = importPathList.at(i) + QLatin1String("/QtQuick/VirtualKeyboard/Styles/"); //###### added, so path must: qrc:/qt/qml/QtQuick/VirtualKeyboard/Styles stylePathList += stylesPath; } // Path for backwards compatibility stylePathList << QLatin1String("qrc:/QtQuick/VirtualKeyboard/content/styles/"); for (const QString &stylePath : std::as_const(stylePathList)) { QString filePath = buildStyleFilePath(stylePath, name); bool pathExist = false; pathExist = QFileInfo::exists(filePath); if (pathExist) return buildStylePath(stylePath, name); } return QString(); } Hopefully this will save someone an hour.
  • 0 Votes
    2 Posts
    288 Views
    The most natural way in QML is a model-view approach. If that at all fits your use case it is usually the cleanest way to go. The UI does not need to be a list (view) as such in order to be driven by a list model. You could use a Repeater-based approach for example. You said you struggled to get the bindings to a list model to work properly. This is almost certainly because of something fairly simple that you are doing wrong, so I would advise persevering with that to find out what the problem is. Reduce it down to a simple case and post it here if you are still struggling.
  • Very long time loaded svg in Image.

    Solved 7 Aug 2025, 12:25
    0 Votes
    13 Posts
    854 Views
    Yes, I add this dll in release and then svg is work, thanks
  • 0 Votes
    4 Posts
    247 Views
    Does your system supports avx2? Please provide a minimal compileable example to reproduce the problem. No qml needed for this I would guess.
  • 0 Votes
    3 Posts
    568 Views
    The same issue. I am trying to run 5.12 codes with QT creator 6.19 on Win11. On Mac this combination is OK. On Win 11 run with QT 5.12 no such issue.
  • QML - How to keep header and footer fix for all apps.

    Unsolved 5 Aug 2025, 05:38
    0 Votes
    6 Posts
    480 Views
    OK, my previous links were for Wayland, so they don't apply to Android. Is this for Android Automotive? If so, then you probably want to use the ActivityView to embed your 3rd-party apps, and you can put your own header and footer around the ActivityView: https://www.qt.io/blog/qt-android-activity-view https://doc.qt.io/QtAndroidAutomotive-6.9/activityview-examples.html Please note: Qt for Android Automotive is a commercial-only product, and is not available to most users on this community forum. If you require further assistance, please contact Qt Support
  • Qt Networking

    Unsolved 7 Aug 2025, 10:39
    0 Votes
    2 Posts
    148 Views
    Hi, Something like the device utilities module ?
  • Windeployqt and QML

    Solved 14 Nov 2016, 18:22
    2 Votes
    7 Posts
    14k Views
    @Devopia53 Thank you very much !