Skip to content
Qt 6.11 is out! See what's new in the release blog
  • 145k Topics
    725k Posts
    EskilE
    Unfortunately, one is not decisively better than the other, or we would not have included both. It depends on the use case you have in mind. If the target size of the image is known at build time, then I would usually recommend converting it to a PNG as part of the build process and showing it with an Image component. Drawing a prerasterized image is as fast as it gets. If your application is running on multiple form factors and therefore needs to be able to render the image at arbitrary sizes, this approach becomes impratical. But if the target size is selected at startup of the application and stays the same for its duration, then including the SVG file and rendering it with an Image will likely be best. There is a cost to rasterize the SVG the first time it is loaded, but otherwise this performs the same as rendering a PNG. If you need to transform the image while the application is running (for instance doing animated zooms like in the Weather Forecast example: https://doc.qt.io/qt-6/qtquick-quickshapes-weatherforecast-example.html) then the best option currently is VectorImage. The same goes if the SVG is animated. As an additional point: If the SVGs are rasterized at very large sizes, then VectorImage will typically be more conservative of memory. So it can also depend on which resource you want to conserve. Some notes about this from the documentation: https://doc.qt.io/qt-6/topics-graphics2d.html#prerasterized-vector-images
  • Jobs, project showcases, announcements - anything that isn't directly development
    4k 23k
    4k Topics
    23k Posts
    SGaistS
    @Richard-Moe-Gustavsen thanks for the details ! I saw the QStyle mention and thought it would be a dedicated style but I was wondering whether it would act like a proxy or be a full style. That question has been answered :-)
  • Everything related to designing and design tools

    132 397
    132 Topics
    397 Posts
    SGaistS
    Hi, I think the wiki has the starting point Hope it helps
  • Everything related to the Software Quality Tools

    96 266
    96 Topics
    266 Posts
    C
    @Emma-2000 said in Squish for Java, select an item in a list box: I’ve run into a similar issue with long JavaFX lists where the target item isn’t initially visible. Using the component’s available items/model instead of relying only on scrolling seems much more reliable, especially when the test input changes dynamically. Agreed on using the model and toolkit API to access or even scroll a particular object into view. (Squish for Java tries to automatically scroll an object into view upon mouseClick(). And one can pass Button.NoButton (https://doc.qt.io/squish/java-convenience-api.html#java-convenience-function-parameters) to mouseClick() to trigger the scrolling attempt without performing a mouse click.) The approach with obj.items.length, obj.items.get(i) and assigning obj.value looks particularly useful for making the test independent of the item’s position in the list. obj.items.get(i) requires specifying the index of the item, which I intuitively understand to be the "position in the list". Perhaps by "position" you meant the location on the screen? If so, yes, hardcoded positions are better to be avoided. (Squish is using screen positions for sending events, etc. - but it determines/calculates these screen locations at runtime.) Ah, after further consideration, you probably meant iterating over the items until the desired one is found. Alright.
  • Everything related to learning Qt.

    401 2k
    401 Topics
    2k Posts
    Nils SjobergN
    Nice..now he knew whether to perform certification
  • 2k Topics
    13k Posts
    L
    Qt for HarmonyOS development with 6.12.0 https://wiki.qt.io/Qt_for_HarmonyOS_development_with_6.12.0 https://lists.qt-project.org/pipermail/development/2026-August/047432.html #Qt #HarmonyOS #OpenHarmony #Huawei
  • 4k Topics
    18k Posts
    H
    [image: acc63b82-54bc-40d4-a5d1-005d45c1cd23.png]
  • This is where all the posts related to the Qt web services go. Including severe sillyness.
    1k 10k
    1k Topics
    10k Posts
    SGaistS
    Ok, akismet triggering is not always clear. Beside this issue, what was your question about ?