Skip to content

Installation and Deployment

Your Qt just doesn't want to build? Your compiler can't find the libs? Here's where you find comfort and understanding. And help.
9.7k Topics 51.0k Posts
  • 18 Votes
    1 Posts
    23k Views
    No one has replied
  • App bundle not work after executing macdeployqt

    Unsolved about 10 hours ago
    0 Votes
    4 Posts
    30 Views
    Hi and welcome to devnet, Which exact error are you getting ? And yes, not signing your application can trigger issues since macOS is pretty protective in that regard (signature + notarization).
  • Can qtwebglplugin be installed with aqt?

    Unsolved about 4 hours ago
    0 Votes
    2 Posts
    18 Views
    Hi, Did you consider using the vnc platform plug-in ? It might be simpler.
  • "AllUsers" not working if set programmatically in QtIFW

    Unsolved about 8 hours ago
    0 Votes
    4 Posts
    21 Views
    @Flinco This was supposed to be a test to see if you can get something working. Obviously you should not pass a literal string but something based on system.value(QLatin1String("Common Desktop")) and replaceWindowsEnvironmentVariables(desktop), per the code you showed.
  • QMediaPlayer does not work on NixOS

    Unsolved 2 days ago
    0 Votes
    9 Posts
    103 Views
    setenv( "DISPLAY", ":0", 1 ); setenv( "GDK_BACKEND", "wayland", 1 ); setenv( "QT_QPA_PLATFORM", "wayland", 1 ); setenv( "XDG_RUNTIME_DIR", "/run/user/1000", 1 ); setenv( "WAYLAND_DISPLAY", "wayland-1", 1 ); setenv( "QT_QPA_FONTDIR", "/usr/share/fonts/truetype", 1 ); I need these settings in my Qt code on Yocto wayland .
  • Unexpected result of CMake Install

    Unsolved 19 Apr 2025, 12:34
    0 Votes
    4 Posts
    183 Views
    I don't do much development on macOS, but AIUI the reason the deploy tool is run on the files in the build dir is that you're not expected to install them. (Not using CMake, anyway.) If you look at the docs on macOS deployment using CMake, they say: To build for Apple platforms you need to set cmake_minimum_required() to 3.21.1 or newer: cmake_minimum_required(VERSION 3.21.1) Go into the directory that contains the application: cd /path/to/Qt/examples/widgets/tools/plugandpaint/app Next, set the CMAKE_PREFIX_PATH variable to point to your installation prefix. If you have a Cmake build already, delete the CMakeCache.txt file. Then, rerun CMake: cmake -DCMAKE_PREFIX_PATH=path/to/Qt/6.9.1/your_platform -S <source-dir> -B <build-dir> -G Ninja Alternatively, use the convenience script qt-cmake, which sets the CMAKE_PREFIX_PATH variable for you. path/to/Qt/6.9.1/your_platform/bin/qt-cmake -S <source-dir> -B <build-dir> -G Ninja Finally, go into your build directory and run your preferred build system. In this example, we're using Ninja. cd path/to/build/dir ninja Now, provided that everything compiled and linked without any errors, you should have a plugandpaint.app bundle ready for deployment. Try installing the bundle on a machine running macOS that does not have Qt or any Qt applications installed. So, the application bundle in the build directory is the one processed by macdeployqt (which you can see is the case in your own CMake output as well), on the assumption that after it's been made self-contained and code-signed, it's ready for deployment using standard macOS means (.dmg files and drag-and-drop installation). Update I've decided I'm wrong about some of this, because the deployment tools only run on install(). Qt's CMake deployment docs mention, for Qt Quick applications: You install the application as before. install(TARGETS MyApp BUNDLE DESTINATION . RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ) To generate the deployment script, you call qt_generate_deploy_qml_app_script() instead of qt_generate_deploy_app_script(). qt_generate_deploy_qml_app_script( TARGET MyApp OUTPUT_SCRIPT deploy_script ) install(SCRIPT ${deploy_script}) On installation, the application binary will be deployed, including the QML files and the shared libraries and assets of Qt that are used by the project. Again, the resulting directory is self-contained and can be packaged by tools like cpack. It might be worth looking at the generated cmake_install.cmake in the bundle's build directory, to see what it's doing? That file will be created immediately after configuration, you don't even need to run the build to examine it.
  • 0 Votes
    1 Posts
    35 Views
    No one has replied
  • 0 Votes
    19 Posts
    3k Views
    I know this is an old post, but I figured I'd add this information as I ran into it. I don't think it is related to autogen or timestamps, I believe it is related to precompiled header files in general, because some of the failures I ran into had nothing to do with autogen, even thought some of them did: /Fdqtbase\src\openglwidgets\CMakeFiles\OpenGLWidgets.dir\ /FS -c qtbase\src\openglwidgets\CMakeFiles\OpenGLWidgets.dir\cmake_pch.cxx Microsoft (R) C/C++ Optimizing Compiler Version 19.29.30153 for x64 Copyright (C) Microsoft Corporation. All rights reserved. ninja: build stopped: subcommand failed. 11:55:53 [836/4092] Building CXX object qtlanguageserver\src\jsonrpc\CMakeFiles\JsonRpcPrivate.dir\cmake_pch.cxx.obj 11:55:53 [837/4092] Building CXX object qtgrpc\src\protobuf\CMakeFiles\Protobuf.dir\cmake_pch.cxx.obj 11:55:53 [838/4092] Building CXX object qtserialport\src\serialport\CMakeFiles\SerialPort.dir\cmake_pch.cxx.obj 11:55:53 [839/4092] Building CXX object qtconnectivity\src\nfc\CMakeFiles\Nfc.dir\cmake_pch.cxx.obj 11:55:53 ninja: build stopped: subcommand failed. I was able to work-around it by disabling precompiled headers files by adding -DCMAKE_DISABLE_PRECOMPILE_HEADERS=ON to the CMake generation step. I was using the CMake with Visual Studio 2019 ( 3.20.21032501-MSVC_2) on Qt 6.7.3.
  • Qt VSTools versus CMake build

    Unsolved 11 days ago
    0 Votes
    9 Posts
    301 Views
    @Axel-Spoerl said in Qt VSTools versus CMake build: Is the cmake-gui any good? Just like git, I always found the command line easier to use.... So far, I have never really learned CMake in depth. I have run into problems with CMake on the command line when reconfiguring with different options (because you forgot one). The cmake-gui (and also ccmake on the command line) seem to do the correct thing in the background. Especially on Windows, the default of the cmake-gui is to generate a VS project (there is even a button to directly open the project from the cmake-gui). For someone without any knowledge of CMake this is a much better starting point (especially for 3rd-party libraries) than using the command line. One advantage of cmake-gui and ccmake is that you see all the different options that you can change. By default you only see the options of the project's CMakeList.txt, but you can toggle the advanced mode to see all CMake options as well.
  • Force Open Source Installation

    Moved Unsolved 7 days ago
    0 Votes
    2 Posts
    67 Views
    Hi @studious-serpent, and welcome! Is there a way that I can force the tool to install the open source version? You'll need to log in with a different email address unfortunately.
  • Noob looking for help with PySide6 segmentation fault core dump

    Solved 9 days ago
    0 Votes
    5 Posts
    123 Views
    @jsulm Thank you, that seems to have resolved my issue.
  • Failed to distribute applications in a MSYS2 environment

    Unsolved distribution msys2 9 days ago
    0 Votes
    8 Posts
    166 Views
    @Grit-Clef I mean to check the access rights for the DLLs where you get "could not be found" ("but those dlls are there...").
  • 0 Votes
    2 Posts
    122 Views
    /usr/bin/c++ is the local compiler on Linux, not the cross-compiler, which on my system is x86_64-w64-mingw32-g++. That means, something in the configure step went wrong or the toolchain hasn't been installed correctly. See here for more info: https://doc.qt.io/qtvstools/qtvstools-how-to-cross-compile.html
  • CMake windeployqt not deplying .pdb files for executables

    Solved 11 days ago
    0 Votes
    3 Posts
    127 Views
    So it won't copy the pdb files from my build dir to the deploy dir - OK understood - though I think it should!
  • Can't notarize Qt frameworks

    Unsolved 12 days ago
    0 Votes
    2 Posts
    108 Views
    Hi, How are you doing the notarization ?
  • This topic is deleted!

    Unsolved 13 days ago
    0 Votes
    1 Posts
    1 Views
    No one has replied
  • 0 Votes
    5 Posts
    249 Views
    @ZergedU said in Cannot run Qt Online Installer on Red Hat UBI 9, libxkbcommon-x11.so.0 missing: It looks like Red Hat UBI 9 strips down the AppStream repo from the RHEL version. Notably, the package "libxkbcommon-x11" is missing. Ah... that's a shame. I guess you'll need to resort to a 3rd-party repo then? (Or build it from source)
  • servers

    Unsolved 14 days ago
    0 Votes
    2 Posts
    107 Views
    Hi @nazim, and welcome! The service provider was down for several hours: https://www.bleepingcomputer.com/news/technology/massive-heroku-outage-impacts-web-platforms-worldwide/ It is back online now, and you should be able to log in again.
  • cannot install Qt installer tool on Ubuntu 22.04

    Unsolved 14 days ago
    0 Votes
    2 Posts
    115 Views
    Hi @montanaviking, open your downloaded file with a text editor. You'll see that curl has saved a HTML document, not an executable. Either use a web browser to download it, or ask curl to follow redirects.
  • MaintanenceTool An internal server error occurred

    Solved 14 days ago
    0 Votes
    3 Posts
    219 Views
    Ah, ok, thx.