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
  • Which version of Qt am I using? How do I find out?

    Pinned
    1
    18 Votes
    1 Posts
    23k Views
    No one has replied
  • Qt Installer Framework: online installation of Matlab Runtime 2020b as a component

    Unsolved
    2
    0 Votes
    2 Posts
    31 Views
    JonBJ
    @ValeryK said in Qt Installer Framework: online installation of Matlab Runtime 2020b as a component: What are the QIF capabilities for implementing such behavior? For something as complex as this could you installer.performOperation("Execute", ...), like in https://stackoverflow.com/questions/43901488/how-to-run-an-executable-file-in-qt-installer-framework, a program or script you supply which goes through the various steps? (There are also individual Delete and Extract operations there if wanted.)
  • Qt installer framework: installer crashes when trying to use controlscript

    Unsolved
    3
    0 Votes
    3 Posts
    40 Views
    O
    Running my installer from the command line works as normal without a controlscript. When I run my installer with control script, I get no response and return to the terminal after a few seconds. A new window does not even flash if I use the broken installer program from the terminal. I should note that for the first time after compilation, the terminal program takes a few seconds to do nothing. Subsequent runs from the command line exit immediately. No files are generated anywhere.
  • QMYSQL on Windows 10

    Solved
    8
    0 Votes
    8 Posts
    699 Views
    jsulmJ
    @Kyef He posted a link to a description how to do this - did you check it?
  • 0 Votes
    8 Posts
    110 Views
    Axel SpoerlA
    It's all documented here and it works out of the box. I personally don't use -skip. I explicitly select the submodules I want to build. I always build w/o prefix into directories outside the source tree. E.g. like that: ../dev/configure -developer-build -xcb -nomake examples -make tests -submodules qtdeclarative ninja
  • Qt installer incorrectly detected disk space

    Unsolved install storage bag error
    5
    0 Votes
    5 Posts
    85 Views
    Christian EhrlicherC
    And why do you don't use english in the bug report? Please fix.
  • Setting environment variables for vcpkg

    Solved
    2
    0 Votes
    2 Posts
    73 Views
    PerdrixP
    To answer my own question! I used "Add New Project Property Sheet" to add a property sheet called vcpkg. I told it to save it a file called vcpkg.props in the root directory of the solution. I then configured the two User Macros as above. I then used "Add Existing Property Sheet" to add this file to all configurations of all the projects in the solution. Sounds rather awkward, but it does seem to work.
  • Qt VS Tools Property Manager Qt.props file location

    Solved
    2
    0 Votes
    2 Posts
    51 Views
    PerdrixP
    Solution found, I edited the vcpkg.props file with gets loaded after Qt so that it sets the environment variable: <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ImportGroup Label="PropertySheets" /> <PropertyGroup Label="UserMacros"> <VCPKG_KEEP_ENV_VARS>QTDIR</VCPKG_KEEP_ENV_VARS> <QTDIR>$(QtInstallDir)</QTDIR> </PropertyGroup> <PropertyGroup /> <ItemDefinitionGroup /> <ItemGroup> <BuildMacro Include="VCPKG_KEEP_ENV_VARS"> <Value>$(VCPKG_KEEP_ENV_VARS)</Value> <EnvironmentVariable>true</EnvironmentVariable> </BuildMacro> <BuildMacro Include="QTDIR"> <Value>$(QTDIR)</Value> <EnvironmentVariable>true</EnvironmentVariable> </BuildMacro> </ItemGroup> </Project>
  • I can't install Qt open source

    Moved Unsolved
    6
    0 Votes
    6 Posts
    179 Views
    jsulmJ
    @Pudying Please read what @JKSH wrote
  • [SOLVED] Building Qt 6.9.1 for Android with ssl support.

    Unsolved
    14
    0 Votes
    14 Posts
    460 Views
    SMF-QtS
    @xalioth Thanks that is the answer I have been looking for. My current script is now as follows and seems to have worked, the build has just finished so I will now see what QtCreator makes of it. #! /bin/sh rm -r build-qt mkdir build-qt cd build-qt ../configure -prefix /opt/qt-android/ -qt-host-path /opt/qt6/ -android-abis arm64-v8a -android-sdk /opt/android/sdk/ -android-ndk /opt/android/sdk/ndk/27.2.12479018 -skip qtwebengine -openssl-linked -- -D OPENSSL_ROOT_DIR="/work/Qt-Android/android_openssl/ssl_3/arm64-v8a" exit $?
  • QMediaPlayer does not work on NixOS

    Unsolved
    10
    0 Votes
    10 Posts
    351 Views
    V
    Xeyes shows that the application is using X11. Once I'll find time, I try to force it to use Wayland.
  • Qt5-base 5.15 build fails with llvm+clang

    Unsolved
    7
    0 Votes
    7 Posts
    1k Views
    W
    I have just experienced what looks like the exact same error. Even the same line number. Clang++-19, Qt5-base 5.15.17, Linux Alpine 3.22 ../../include/QtNetwork/5.15.17/QtNetwork/private/../../../../../../src/network/socket/qnet_unix_p.h:120:29: error: cannot initialize a parameter of type 'socklen_t *' (aka 'unsigned int *') with an rvalue of type 'int *' 120 | fd = ::accept4(s, addr, static_cast<QT_SOCKLEN_T *>(addrlen), sockflags); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ I believe it is a result of the defines in qtplatformdefs.h, where linux clang & linux llvm are implemented with opposite logic to linux g++? (Alpine will be the default #else in both cases, because it is MUSL, not GLIBC. One will be socklen_t and the other will be the offending int. Swapping the logic to match g++ is probably a hack, but it then compiles ok on Alpine.)
  • Can qtwebglplugin be installed with aqt?

    Unsolved
    6
    0 Votes
    6 Posts
    217 Views
    KH-219DesignK
    Speaking from my own past experience with the person/team managing aqt, you can expect a helpful reply by interacting with that project here: https://github.com/miurahr/aqtinstall/issues
  • qtconsole beginner question creator 17

    Solved
    10
    0 Votes
    10 Posts
    277 Views
    J
    ok so judging by everyone's responses i realised it wasn't that the code was out of date and that creator 17 needed updated instructions, rather there was something wrong with my setup. so in case anyone else has this problem with gnome desktop environment, the culprit is gnome's default terminal app "Console". this app has a binary called kxg and i couldn't figure out what instruction to give to creator to launch it. so i installed gnome-terminal and made this the default terminal app. under environment variables in the manage kits section, the terminal command is gnome-terminal -x. this seems to have solved the problem. thanks to everyone who replied. it set me in the right direction!
  • .exe file is not opening

    Solved
    28
    0 Votes
    28 Posts
    5k Views
    jsulmJ
    @Puneeth_BR Deploy your app properly first. See https://doc.qt.io/qt-6/deployment.html
  • App bundle not work after executing macdeployqt

    Unsolved
    8
    0 Votes
    8 Posts
    246 Views
    SGaistS
    AFAIK, no, you don't need a company account unless you are working for a company for that application.
  • "AllUsers" not working if set programmatically in QtIFW

    Unsolved
    6
    0 Votes
    6 Posts
    192 Views
    JonBJ
    @Flinco That was indeed the kind of thing I was suggesting. For unknown reason it appears that the if in if (m_variables.value(QLatin1String("AllUsers")) == scTrue) { desktop = system.value(QLatin1String("Common Desktop")).toString(); } else { desktop = user.value(QLatin1String("Desktop")).toString(); } reacts as desired when you pass AllUsers=true on command line but not when function Controller() { installer.setValue("AllUsers", "true"); } Perhaps this is "too late" (or even "too early") for the call to addDynamicPredefinedVariables(). Your new code/this "workaround" does the code for the choice of system.value(QLatin1String("Common Desktop")) unconditionally without relying on m_variables.value(QLatin1String("AllUsers")) == scTrue (btw, I do not know whether setValue("AllUsers", "true") actually sets a value which equals scTrue).
  • Unexpected result of CMake Install

    Unsolved
    4
    0 Votes
    4 Posts
    245 Views
    FeRDNYCF
    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
    91 Views
    No one has replied
  • Building QT6 from Source failed (qtbase printsupport_autogen\timestamp)

    Unsolved
    19
    0 Votes
    19 Posts
    3k Views
    A
    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.