Skip to content

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
  • 0 Votes
    3 Posts
    97 Views
    Grzesiek11G
    @SGaist I am not, I'm using "proper" bindings by KDAB. (I did try out Qt Bridges but it's extremely limited compared to C++.)
  • Qt Graphs lacking functionalities - Axes range

    Unsolved
    21
    1 Votes
    21 Posts
    8k Views
    M
    @AndyBrice said in Qt Graphs lacking functionalities - Axes range: I guess I will be using QtCharts and hoping that it is supported for some time into the forseeable future. Hi Andy, I'm wondering what did you end up using? I ran into similar dillema a while ago and ended up handcrafting a library. Are you considering using 3rd party libs?
  • ValueAxis label and tick misalignment when modifying range in Qt Graphs (QML)

    Unsolved
    4
    0 Votes
    4 Posts
    146 Views
    M
    Hi, I have submitted the bug report on Jira along with a minimal reproducible example and screenshots: https://qt-project.atlassian.net/browse/QTBUG-152112 Thank you for your guidance!
  • ListView for chat message history: positionViewAtIndex doesn't work reliably (+repro)

    Unsolved
    3
    0 Votes
    3 Posts
    328 Views
    J
    This is an interesting issue with Qt Quick ListView, especially when working with variable-height delegates. The estimated delegate sizes can sometimes cause unexpected scroll positioning when jumping to items that are outside the visible area. Calling positionViewAtIndex() twice may help as a workaround, as the first call allows ListView to create nearby delegates and update its size estimates.
  • QML HighDPI scaling problem on Windows 11

    Solved
    9
    0 Votes
    9 Posts
    766 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
    330 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
    357 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
    161 Views
    No one has replied
  • Why is drawcall batching (using my own QSGNodes) slower?

    Solved
    3
    0 Votes
    3 Posts
    434 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
    482 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
    365 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
    312 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
    322 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
    581 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
    362 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
    479 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
    674 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