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.5k Topics 49.6k Posts
QtWS25 Call for Papers
  • 18 Votes
    1 Posts
    19k Views
    No one has replied
  • 0 Votes
    3 Posts
    638 Views
    D

    Hi @svcguy were you able to resolve it ?

  • 0 Votes
    5 Posts
    744 Views
    F

    Thanks for the hint, I did sudo apt remove qt5* libqt5* and that solved my problem. The system QT5 was too old.

  • 0 Votes
    5 Posts
    2k Views
    P

    I ended up creating a class to handle this kind of shortcut:

    // QT IFW seems to have a bug. If you use AllUsersStartMenuProgramsPath, it won't then set the icon for the shortcut. // This wouldn't be a problem if the target exe had an icon builtin. // Also, it ignores the StartMenuDir setting in config.xml. // This class just does something like this: // component.addElevatedOperation("CreateShortcut", `@TargetDir@/${itemName}`, // `@AllUsersStartMenuProgramsPath@/${linkName}.lnk`, // `iconPath=${iconPath}`); class AllUserShortcut { // Constructor method constructor(companyName, productName) { this.companyName = companyName; this.productName = productName; } static createFolder(folderPath) { // Create a folder if it doesn't exist and remove it on uninstall if it's empty. var psCreateFolder = ` if (-Not (Test-Path -Path "${folderPath}")) { New-Item -ItemType Directory -Path "${folderPath}" }`; var psDeleteEmptyFolder = ` if ((Test-Path -Path "${folderPath}") -and (Get-ChildItem -Path "${folderPath}").Count -eq 0) { Remove-Item -Path "${folderPath}" }`; component.addElevatedOperation("Execute", [ "powershell.exe", "-ExecutionPolicy", "Bypass", "-Command", psCreateFolder ], "UNDOEXECUTE", [ "powershell.exe", "-ExecutionPolicy", "Bypass", "-Command", psDeleteEmptyFolder ]); } createShortcut(itemName, linkName, iconPath) { console.log(`Creating shortcut: ${this.companyName}\\${this.productName}\\${linkName} -> @TargetDir\\${itemName}`); var commonStartMenuDir = installer.environmentVariable("ALLUSERSPROFILE") + "\\Microsoft\\Windows\\Start Menu\\Programs"; // Create company folder. var companyPath = commonStartMenuDir + `\\${this.companyName}`; AllUserShortcut.createFolder(companyPath); // Create product folder. var productPath = companyPath + `\\${this.productName}`; AllUserShortcut.createFolder(productPath); // Use a PowerShell script to create the shortcut with the icon var shortcutPath = productPath + `\\${linkName}.lnk`; var targetPath = installer.value("TargetDir") + `\\${itemName}`;; var psScriptContent = ` $WScriptShell = New-Object -ComObject WScript.Shell $Shortcut = $WScriptShell.CreateShortcut("${shortcutPath}") $Shortcut.TargetPath = "${targetPath}"` if (iconPath) { psScriptContent += ` $Shortcut.IconLocation = "${iconPath}"` } psScriptContent += ` $Shortcut.Save() `; component.addElevatedOperation("Execute", [ "powershell.exe", "-ExecutionPolicy", "Bypass", "-Command", psScriptContent ], "UNDOEXECUTE", [ "powershell.exe", "-ExecutionPolicy", "Bypass", "-Command", `Remove-Item -Path "${shortcutPath}" -Force` ]); } }
  • macdeployqt, windeployqt: deploying Qt.labs.qmlmodels

    Unsolved
    1
    0 Votes
    1 Posts
    25 Views
    No one has replied
  • Qt Installation Error On Windows System

    Solved
    17
    0 Votes
    17 Posts
    205 Views
    S

    Thank You to Everyone who helped me resolve this issue. I'm successfully building the Qt source code.

  • Qt Application Fails to Load QML Modules in Docker Container

    Unsolved
    6
    0 Votes
    6 Posts
    76 Views
    JonBJ

    @Rakesh-U Did you/could you try running xterm in exactly same environment?

  • Qt Documentation Build Cmake Error

    Unsolved
    4
    0 Votes
    4 Posts
    72 Views
    S

    @Christian-Ehrlicher

    I am not creating the another account and posting the same error, we are trying resolve the documentation bug we both were getting the same error so we psoted the error.

    So the thing is I am trying to resolve the doucumentation bug when i try to configure the particular command i am not getting any errors.../configure -prefix /home/hp-lap/R_QtDoc_Build/qt-doc-bugfix -nomake tests -nomake examples -no-openssl -xcb -xcb-xlib -bundled-xcb-xinput -developer-build -- -DQT_BUILD_TESTS_BY_DEFAULT=OFF

    When I try to go for the furthe step using the below given command we are getting the cmake error.
    cmake /home/hp-lap/R_QtDoc_Build/qt6 -GNinja -DQT_HOST_PATH=/home/hp-lap/Qt_New/6.7.2/gcc_64/bin -DQT_NO_PACKAGE_VERSION_CHECK=TRUE -DQT_NO_PACKAGE_VERSION_INCOMPATIBLE_WARNING=TRUE

    For this I am referring this link https://wiki.qt.io/Building_Qt_Documentation
    In this link i referring only this section "Documentation only build using a Qt host build".

  • Building Qt Documentation Issue

    Locked Unsolved
    2
    0 Votes
    2 Posts
    35 Views
    Christian EhrlicherC

    Do you really think creating another account and asking the same questions really helps?
    https://forum.qt.io/topic/158663/qt-documentation-build-cmake-error

    --> Locked!

  • Qt Documentation Build Error

    Unsolved
    5
    0 Votes
    5 Posts
    103 Views
    S

    yes I have built the source code completely.

  • Qt 6.7.2 - Could NOT find OpenGL

    Solved
    6
    0 Votes
    6 Posts
    115 Views
    SGaistS

    From the looks of it that package is the Qt opengl module development files which is not the same as the OpenGL librairies that were missing. That package may have the latter as dependency though.

  • Qt 6 cmake lupdate update_translations hangs forever

    Unsolved
    6
    0 Votes
    6 Posts
    151 Views
    R

    I have the same problem. I have a project that used to run lupdate with Qt 5.15 real quick, with no problems. After the migration to CMAKE to use Qt 6.7.0, lupdate never ends. The project is a big with a few 3rdParty libraries.
    I tried to specify just main.qml in the SOURCES for qt_add_translations, hoping to get rid of all the rest of the files. Only for test purposes. But I had no luck with that.
    Has anyone been able to solve this?

  • libmimerapi.so => not found

    Unsolved
    4
    0 Votes
    4 Posts
    480 Views
    V

    I was having the same error with missing libmimerapi.so, I tried to install the package from mimer but that also did not work. What eventually ended up making this work was adding the argument:

    -exclude-libs=libqsqlmimer

    so in total my linuxdepoloyqt command was

    linuxdeployqt-continuous-x86_64.AppImage <my binary> -unsupported-allow-new-glibc -qmake=~/Qt/6.6.1/gcc_64/bin/qmake -exclude-libs=libqsqlmimer

    and that worked for me. And running my app image in a new vm with no previous libraries removed the error of not being able to connect to sql databases (although I am not sure if that is the same issue you had here)

  • Missing Qt Debug Information File

    Moved Unsolved
    2
    0 Votes
    2 Posts
    65 Views
    Axel SpoerlA

    You have selected "Latest supported releases", which is 6.6.3.
    We typically provide debugging symbols for the latest patch release. Since 6.6.3 is binary compatible with 6.6.1, there is no need to keep 6.6.1 around at all.

  • This topic is deleted!

    Solved
    2
    0 Votes
    2 Posts
    77 Views
  • Linker error in build Qt 5.15 for Windows

    Solved
    6
    0 Votes
    6 Posts
    144 Views
    Y

    Problem was solved, because some modules were skipped. Result configure is

    configure.bat -debug -nomake examples -nomake tests -skip qtwebengine -skip declarative -skip qtdeclarative -skip qtlocation -skip qtmultimedia -skip qtquickcontrols -skip qtsensors -skip qttools -skip qtwebsockets -skip qtwinextras -skip qtwebchannel -skip qtwebengine -opensource -platform win32-msvc

  • 0 Votes
    3 Posts
    63 Views
    jsulmJ

    @Ahmad296 said in Troubleshooting Deployment Issues with Custom Built Qt Application on Linux:

    I've ensured all necessary dependencies are included

    Check that on the target machine using:

    ldd YOUR_APP_EXECUTABLE
  • Deploying on macos failed.

    Unsolved
    2
    0 Votes
    2 Posts
    75 Views
    artwawA

    You are creating a bundle. Just cd into the target folder containing your .app as it was compiled (or move said .app to an empty location) and run macdeployqt.
    I usually write a small deploy script for a final product, with code signing and everything but that all comes later. Absolute minimum that would make your bundle working:
    cd into the target where your .app is compiled
    macdeployqt with any optional parameters you might want.

    Please note that if you use any 3rd party libraries macdeployqt will not know about them. You should manually (or via script) include them yourself in appropriate location.

  • Building QtOpcUa WrapOpenSSL not found

    Unsolved
    1
    0 Votes
    1 Posts
    35 Views
    No one has replied
  • 0 Votes
    2 Posts
    87 Views
    Axel SpoerlA

    You can’t build webengine alone.
    Read this: https://wiki.qt.io/QtWebEngine/Qt6Build