Skip to content
qtws26_logo

The Qt Event of the Year: Qt World Summit 2026

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.3k Topics 78.4k Posts
Qt 6.12 LTS is out! See what's new in the release blog
  • ListView for chat message history: positionViewAtIndex doesn't work reliably (+repro)

    Unsolved
    1
    0 Votes
    1 Posts
    149 Views
    No one has replied
  • QML HighDPI scaling problem on Windows 11

    Solved
    9
    0 Votes
    9 Posts
    627 Views
    Y
    @Axel-Spoerl Sorry. It looks like the black rectangle isn't a regression, but rather the implementation of dark mode support. In version 6.8, dark mode wasn't applied automatically. If the system color theme is light, both versions look identical. Qt 6.8.3, Dark theme, scale 100%: [image: 71a73ecd-1d25-45ed-8f99-4f2ec5c51524.png] Qt 6.12.0, Light theme, scale 100%: [image: 8b33cb68-132d-4875-abc8-16958c5d9507.png] Interestingly, even at 100% scale, the scrollbar looks a bit jagged in both versions, even though the scrollbar itself is straight. However, Fusion.ScrollBar looks good. Thank You. [image: 31dff5ec-b1ac-45f7-a7c0-780738a887fd.png] Should I close the topic as resolved?
  • 1 Votes
    3 Posts
    264 Views
    Z
    Thank you! Very little useful information unfortunately. I get this upon initialization, but nothing else (even when updating the render target): [18] Creating QRhi with backend Vulkan for window 0x55beb55752a0 (wflags 0x1) Graphics API debug/validation layers: 0 Debug markers: 0 Timestamps: 0 Prefer software device: 0 Shader/pipeline cache collection: 1 [18] Using existing native Vulkan physical device 0x55beb59dcc80 device 0x55beb5acb7c0 graphics queue family index 0 [18] Initializing QRhi Vulkan backend 0x55beb559cef0 with flags 20 [18] Enabled instance extensions: [18] VK_KHR_get_physical_device_properties2 [18] VK_EXT_swapchain_colorspace [18] Using imported physical device 'NVIDIA GeForce RTX 5070 Laptop GPU' 610.228.256 (api 1.4.341 vendor 0x10DE device 0x2D18 type 2) [18] 280 device extensions available [18] Using imported device 0x55beb5acb7c0 [18] Using queue family index 0 and queue index 0 [18] Created QRhi 0x55bec060c310 for window 0x55beb55752a0 [18] Attempting to seed pipeline cache for QRhi 0x55bec060c310 from '/home/znurre/.cache/qtpipelinecache-x86_64-little_endian-lp64/qqpc_vulkan' [18] Created pipeline cache with initial data of 291394 bytes [18] rhi texture atlas dimensions: 2048x1024
  • How to get current file name with extension?

    Unsolved
    3
    0 Votes
    3 Posts
    293 Views
    L
    @KH-219Design said in How to get current file name with extension?: From this older post: https://forum.qt.io/topic/122818/get-file-name-line-number-and-function-name-in-qml-javascript-how I learned that this is possible in QML: const e = new Error() console.log(e.stack) Sample output: expression for myCustomPropertyName@file:///long/path/to/my/qml/VersionLabel.qml:28 The older forum thread has additional ideas for parsing the string if you prefer to see only a substring of what is in Error().stack or here is how it looks when the QML file is compiled into the C++ app binary: expression for myCustomPropertyName@qrc:/qml/VersionLabel.qml:28 Took a look but it seems that if you have a file that does this and is called by another QML file it'll stack the expression to that file as well. For example if I call it from a file called Page.qml but the error stack is called from Settings.qml I'd get Debug: expression for onCompleted@file:///Settings.qml:14 expression for onCompleted@file:///Page.qml:103 So I'd guess I'd need to some how parse the first line of the stack
  • 1 Votes
    1 Posts
    134 Views
    No one has replied
  • Why is drawcall batching (using my own QSGNodes) slower?

    Solved
    3
    0 Votes
    3 Posts
    363 Views
    S
    I used 1024 segments because it was mend as stress test. But after I switched to 32-64 segments there was a significant difference.
  • What is best way to implement controls that render very fast?

    Solved
    7
    0 Votes
    7 Posts
    2k Views
    S
    See my post 'Why is drawcall batching (using my own QSGNodes) slower?'
  • SatelliteSource missing data

    Unsolved positioning satellitesource nmea
    5
    0 Votes
    5 Posts
    417 Views
    A
    I filed this issue too: https://qt-project.atlassian.net/browse/QTBUG-150742 - a suggestion to add support for unix sockets in the SatelliteSource object, which would mean no need to pipe gnss-share output. I would really like for someone to confirm if the sattlitesInView list is empty - I have not been able to fix that, and I consider filing an issue for that as well.
  • a generic qml label for display of an image and a text

    Unsolved
    3
    0 Votes
    3 Posts
    2k Views
    B
    The "icon" is a text here, not SVG, right? https://github.com/qt-creator/qt-creator/blob/5f363dbc8782673fb3da53321f30070d1026eeca/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/IconLabel.qml#L10
  • Centering ScrollView in the middle of the screen

    Solved
    3
    0 Votes
    3 Posts
    319 Views
    D
    @sierdzio There also seems to be some interaction with wrap mode of the text, also depends if one uses JS script: my text string, or not. Anyways, i ended up using ColumnLayout with a ListView that fills it and that ListView has delegate Item that has column embedded in it, which is anchors.horizontalCenter: parent.horizontalCenter . I tried to have just column as delegate, but that also wouldnt work, so i wrapped it in an item. Anyways it is not that important atm, i might return here once I have time to experiment more.
  • Order of multiple C++ QML_ELEMENT instantiation

    Solved
    2
    1 Votes
    2 Posts
    275 Views
    F
    Consider the order to be undefined, and something you shouldn't rely on. To be honest, that's the same as if you were to use qmlRegisterSingletonType using the imperative API; there's no instantiation at the point of the registration, that will happen later when the engine actually needs the singleton (and "needs" is intentionally vague here). If you have an order-dependent construction, you should (in that order of preferability) a) consider if you can move away from that pattern, or b) use https://doc-snapshots.qt.io/qt6-dev/qqmlengine.html#setExternalSingletonInstance once 6.12 is released or c) keep using imperative registration.
  • OpenUSD Hydra + Qt Quick/QRhi/Vulkan Integration, Architectural Guidance

    Unsolved
    2
    0 Votes
    2 Posts
    268 Views
    Nils SjobergN
    Decouple Hydra and Qt for independent rendering, share the VkDevice in a synchronized manner, and connect them using VkImage and GPU synchronization (timeline semaphores) instead of blocking the GUI on every frame.
  • no signal of the target matches the name

    Solved
    5
    1 Votes
    5 Posts
    497 Views
    KH-219DesignK
    This is a nice mini writeup that will surely help people who encounter (and then google) the output: "This is probably intended to be a signal handler but no signal of the target matches the name"
  • Auto-regiersting QML types in MSBuild

    Unsolved
    2
    0 Votes
    2 Posts
    307 Views
    Nils SjobergN
    Write a .pro file, import it into Qt VS Tools - QtQmlTypeRegistrar is valid in MSBuild - this is the only supported path,
  • How do those crazy Q Macros work?

    Solved
    4
    0 Votes
    4 Posts
    405 Views
    JKSHJ
    @DSpUz said in How do those crazy Q Macros work?: there is no visible Object instance. There IS an object instance! The singleton is an instance. I do not quite understand how the so called "signal" can change value of a property A NOTIFY signal tells the QML engine to discard the old (cached) property value and read it again. When your Globals singleton (instance) emits the numberChanged signal, the QML engine re-reads Globals.number and updates the text.
  • Image vs VectorImage for SVG. What to use?

    Unsolved
    5
    0 Votes
    5 Posts
    605 Views
    S
    I agree that for fixed sizes PNG is the better format. However, for mobile devices in a lot of cases the size is not fixed. Maybe I have assumed too much 😉. Even on desktop we tend to use SVG for icons because of display scaling (though as far as I know if you have a dedicated designer he should design PNGs for different resolutions instead).
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    17 Views
    No one has replied
  • AVD Black screen issue

    Solved
    4
    0 Votes
    4 Posts
    484 Views
    D
    I want to add, that changing hw.gpu.mode=hardware seems to be not the same as hw.gpu.mode=Hardware - GLES 2.0, changing it to hardware seemed to solve the issue for some time, but today as it resurfaced i first tried Software - GLES 2.0 and it (at least for now) solved the issue, so i switched to Hardware - GLES 2.0 for seemingly better responsiveness(might be placebo though).
  • Submodule QML module not found (MySubmoduleName)

    Solved
    6
    0 Votes
    6 Posts
    582 Views
    D
    @JKSH the QT_QML_OUTPUT_DIRECTORY is setting is not covered in the video tutorial itself, it is only in the github repository, one of the recent rating comments does hint at this: [image: db4c45f8-b684-4068-a7bf-c1ff17440729.png] I think if one includes it in the CMake file then it is enough (though i didn't test it), no need to use QML Language Server. Also your identifier tip solved the other warning, thanks.
  • import ModelViewDelegate fails

    Solved
    9
    0 Votes
    9 Posts
    737 Views
    A
    @DSpUz my laptop was bad so i couldnt reply