Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.3k Topics 455.6k Posts
  • 0 Votes
    6 Posts
    315 Views
    @Simplicius-Simplicissimus said in [Translations] documentation on embedding translations in the executable.: The QTLinguist Documentation included in https://doc.qt.io/qt-6/reference-overview.html does not explain how to embed translations in the executable file. But the other source I linked does... Literally the first section there: The Qt Resource System The Qt resource system is a platform-independent mechanism for shipping resource files in an application. Use it if your application always needs a certain set of files (like icons, translation files, images), and you don't want to use system-specific means to package and locate these resources. Most commonly, the resource files are embedded into your application executable, or in libraries and plugins that are loaded by the application executable. Alternatively, the resource files can also be stored in an external resource file. The resource system is based on tight cooperation between Qt's rcc resource compiler, the build system, and the Qt runtime API. This is what @Christian-Ehrlicher told you... and what I was referring to here: @Pl45m4 said in [Translations] documentation on embedding translations in the executable.: Read about the Qt Resource System, if you don't understand. @Simplicius-Simplicissimus said in [Translations] documentation on embedding translations in the executable.: I do not need to ship the translation files with the program. Using the resource system you "ship" them as bytecode embedded in your binary. You don't want to provide 17 files for 17 different languages, right? What else do you need?!
  • QtCreator cannot display .rep file format

    Solved 19 Feb 2025, 09:32
    1 Votes
    6 Posts
    425 Views
    @majorRonk - I encountered the same issue, using Windows 11, Qt6.8.2. In QtCreator 15 I saw the .rep as you did. In QtCreator 16 it was fixed - https://bugreports.qt.io/browse/QTCREATORBUG-32522 . Probably worth marking your discussion as fixed.
  • Qt6.8.1 Windows is not having qsqloci.dll

    Unsolved 22 days ago
    0 Votes
    5 Posts
    306 Views
    @Qt6User said in Qt6.8.1 Windows is not having qsqloci.dll: Looks like setting -DQT_GENERATE_SBOM=OFF made the error go. Yes, that is a known issue with 6.8.1
  • Qt WebEngine still unsupported on Windows for ARM on 6.8+

    Unsolved 29 Dec 2024, 09:42
    0 Votes
    8 Posts
    1k Views
    I’ve successfully built QtWebEngine and QtPdf for Windows ARM. If anyone’s interested, I’ve documented the full guide here: https://github.com/fauzanelka/qtwebengine-arm64
  • 0 Votes
    8 Posts
    371 Views
    @YiShengPiAn Your widget position changes. Add print to paintEvent to check its coordinate x and you may be be able to find out what causes the horizontal movement of your widget. x should be fixed.
  • Visual Studio 17.13.6 Qt cleanup not working

    Unsolved 30 Apr 2025, 06:57
    0 Votes
    2 Posts
    213 Views
    It appears that this has been fixed in Visual Studio 17.14.2
  • How to get thread information?

    Unsolved 22 days ago
    0 Votes
    4 Posts
    258 Views
    Just start by building for debug, running for debug from Creator. If program generates an "unhandled signal" that should break in the debugger immediately where it happened. Then find stack view pane and look at the traceback.
  • Composition vs Aggregation when working with models

    Unsolved 23 days ago
    0 Votes
    15 Posts
    1k Views
    @ECEC said in Composition vs Aggregation when working with models: I suppose I wouldn't even need to subclass University, Course and Module from a generic TreeItem. I could simply store the pointer in internalPointer and then static_cast back to the required type depending on what level we are at. Exactly, if that is what suits best.
  • Scrolling Marquee Performance Issue

    Unsolved 24 days ago
    0 Votes
    2 Posts
    191 Views
    Hi @SmoothOne, I have encountered similar performance challenges when implementing scrolling marquees in QML, on resource-constrained devices like the Raspberry Pi 4 and 5. Optimize Animation Techniques: While NumberAnimation and Flickable are common choices for creating scrolling effects. consider ShaderEffect for offloading some of the rendering to the GPU, which can lead to smoother animations. Profile App: Utilize Qt's built-in profiling tools to identify bottlenecks. can help determine if the issue stems from the QML layer, the rendering pipeline or elsewhere. it can provide insights into CPU and GPU usage & helping you pinpoint areas for optimization. Simplify Scene Graph: Avoid nesting multiple layers of elements unnecessarily & make sure that only visible elements are being rendered. Hardware: Make sure OpenGL or Vulkan is being utilized effectively for rendering Good Luck..
  • Jagged image in wayland on HiDPI monitor

    Unsolved 24 days ago
    0 Votes
    3 Posts
    230 Views
    Are you using display scaling on the HiDPI monitor? Is everything else (except for the PDF part) rendered the same size if using either Wayland or X11?
  • Qt 6 compiles twice slower that Qt 5

    Unsolved 24 days ago
    0 Votes
    15 Posts
    1k Views
    @cristian-adam said in Qt 6 compiles twice slower that Qt 5: Yes, as of today (may 2025) we could use the latest versions of the three compilers to build C++ code with modules. It is quite overwhelming to compile such a large library as Qt if you are still a beginner or even if you are at an intermediate level. I believe MSVC is doing it right. But, at least one of the other compilers makes modules incompatible if different compiler flags are used. Which would actually mean you need to compile Qt with the compiler flags you are using for your project to be able to use C++ modules with Qt. The future with modules is not as bright as it was promised. (Microsoft has also proposed a module standard exchange format that all compilers could/should use. If supported this could solve this problem.)
  • PCAN-LAN integration in QTSerialBus

    Unsolved 1 Oct 2021, 14:10
    0 Votes
    4 Posts
    332 Views
    FYI: Even when these devices would be supported by QtSerialBus, you could not change the bitrate programmatically; only by the gateways web interface: https://forum.peak-system.com/viewtopic.php?f=41&t=7345
  • 1 Votes
    10 Posts
    7k Views
    @Vincent-Blankfield said in Strange output when I use QString fileName = QFileDialog::getOpenFileName(): and how to get rid of it? Uninstall symantec endpoint protection or ask them to fix it.
  • 0 Votes
    5 Posts
    301 Views
    I tested with a freshly formatted USB stick and new files added to it. Same result. From the looks of it, it seems to be a OS issue with their ExFAT driver implementation. Several threads on different forum report similar issues.
  • In Qt 6 size hints of QSpinBox are not correct

    Unsolved 23 days ago
    0 Votes
    2 Posts
    188 Views
    Use a recent Qt6 version or use the windowsvista style.
  • how to use one ui file in another ui file using designer

    Solved 23 days ago
    0 Votes
    2 Posts
    144 Views
    I figured it out on my own. The Forecast widget can be promoted, and that promoted widget can be used in another ui file
  • Loss of include files

    Unsolved 25 days ago
    0 Votes
    6 Posts
    283 Views
    @Mark-K-R-Walker If your header really looks like you showed us, it's no wonder you get compile errors: #ifndef SOUND_H #define SOUND_H ... class Sound : public QIODevice { Q_OBJECT private: QMediaDevices *AllMediaDevices = nullpointer; QAudioDevice DefaultAudioOutputDevice; public: Sound(); }; // <- Closing curly brace and semicolon are missing! #endif // SOUND_H Please add the }; before the #endif and try again. Regards
  • Proposed performance enhancement for QTreeView::dataChanged

    Unsolved 25 days ago
    0 Votes
    5 Posts
    248 Views
    @inbilla hi, Are you using custom models ? If so, are you also taking advantage of the last argument of the dataChanged signal ? This one limits the roles that the view should get data for in order to update itself.
  • Dselect QListWidget item

    Unsolved 16 May 2025, 01:07
    0 Votes
    3 Posts
    219 Views
    @Axel-Spoerl whatever i did, i couldn't implement QEvent::MouseButtonPress and read empty space in event filter of a QListWidget; resorting to QListView however solved my problem. what i really needed was setCurrentItem(nullptr) setMinimumHeight (at least for QListView ) changes the pane's proportions; i want to add empty area within the pane so the extra space is added for scrolling.
  • Qt service with gui

    Unsolved 6 Jul 2024, 00:41
    0 Votes
    25 Posts
    2k Views
    If you want to prevent that a user to close you app you shoud: implement the closeEvent() event to reply "no". work with machine criteria to disable task manager etc to normal users. Hi, if you want to try to use your app (with gui) as windows service you can use this. https://www.denisgottardello.it/InstallAsService/index.php The gui will not be visible.