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.1k Posts
  • QMYSQL on Windows 10

    Solved
    9
    0 Votes
    9 Posts
    873 Views
    KyefK
    I managed to compile the drivers using thecodemonkey guidlines as hinted by @nyquistjack and other web resources. But a lot is required to make the drivers work for WebAssembley.
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    6 Views
    No one has replied
  • Qt Installer Framework & Windows11: Online installer fails while download ...

    Unsolved
    1
    0 Votes
    1 Posts
    52 Views
    No one has replied
  • MSVC can't find qtpcre2d.lib?

    Solved
    4
    0 Votes
    4 Posts
    134 Views
    T
    Downgraded Qt VS Tools Extension to 3.2.0 and that got it working.
  • Qt Installer Framework: online installation of Matlab Runtime 2020b as a component

    Unsolved
    2
    0 Votes
    2 Posts
    71 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.)
  • 0 Votes
    8 Posts
    266 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
    211 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
    170 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
    100 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
    295 Views
    jsulmJ
    @Pudying Please read what @JKSH wrote
  • [SOLVED] Building Qt 6.9.1 for Android with ssl support.

    Solved
    14
    0 Votes
    14 Posts
    1k 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
    508 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
    283 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
    426 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
    366 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
    286 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
    278 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
    115 Views
    No one has replied