Problems when i launch Qt executable from folder



  • Hey guys,

    I have a little problem when i try to lunch my Qt application from folder and not from Qt IDE. If I launch the application from IDE the interface is ok (all widgets at their place) but after i copy all the needed Qt *.dll in the release folder the application run but pop up an empty window.

    Has somebody any idea about how can i fix this problem and why is happening this?
    Thank you :)



  • @Adrian.Aioanei
    What exactly do you mean with

    after i copy all the needed Qt *.dll in the release folder

    If you just double clicked your exe and searched and copied the dll's that poped up as missing, than you defenitly miss some files :)

    Take a look here last entry Platform-Specific Notes is what you should check, depending on your platform, you'll find tools/guidlines how to deploy your application.



  • Hey @J-Hilk
    Your link doesn't work.:D
    What i have done is to copy from Qt bin folder the dll that my application need (QtCore, QtGui, etc).



  • @Adrian.Aioanei fixed the link,

    yeah, that won't be enough follow the steps and post here if it doesn't work, or you need help.



  • @Adrian.Aioanei

    Probably , you might be missed soem additional lbs. Use Dependency Walker .
    check these Qt deploy tools on windows and http://doc.qt.io/qt-5/deployment.html


  • Moderators

    @Adrian.Aioanei You also should check whether you copied all needed plug-ins



  • Thank you for your replay @J-Hilk , @Ni-Sumi
    I will try when i will go back to my pc to see if this solution solve the problem. :)



  • I have try and also doesn't work.
    Can have a connection with the path to the build directory?
    I have change that path from Qt and now i receive a warning and say "The build directory needs to be at the same level as the source directory".


  • Moderators

    @Adrian.Aioanei Build directory? Why? You want to deploy your app, right? Check http://doc.qt.io/qt-5/windows-deployment.html



  • Yes, that's what i have done but still doesn't work. Every time when i launch my application popup a little window witch doesn't have any connection with my application. Here is what i get.
    alt text
    This is not how looks my application when i lunch from Qt. It has some buttons, labels and so on.


  • Moderators

    @Adrian.Aioanei Set QT_DEBUG_PLUGINS to != 0 before starting your app in cmd and see whether any plug-ins are missing or failed to load. See http://doc.qt.io/qt-5/debug.html



  • I will try and also i will try on a new machine to see if the result is the same.
    I will came back with results.
    Thanks :)



  • I have try on a new workstation and i have rebuild the project but the result is the same. I have made deploy using windeployqt following this video link. I have study the executable with dependency walker show me some missing dll. I was thinking the dll problem is solved by windeployqt . Here is a print
    alt text
    That dll name doesn't tell to much.
    PS: I have also try to make an empty QML Quick 2 Application and make deploy. Also doesn't work...

    UPDATE : I have close the application and rebuild again and now say :

    qrc:/test.qml:4:1: module "QtQuick.Controls" is not installed
    qrc:/test.qml:5:1: module "QtQuick.Controls.Styles" is not installed
    qrc:/test.qml:3:1: module "QtQuick.Window" is not installed
    qrc:/test.qml:1:1: module "QtQuick" is not installed
    qrc:/test.qml:4:1: module "QtQuick.Controls" is not installed
    qrc:/test.qml:5:1: module "QtQuick.Controls.Styles" is not installed
    qrc:/test.qml:3:1: module "QtQuick.Window" is not installed
    qrc:/test.qml:1:1: module "QtQuick" is not installed
    qrc:/test.qml:4:1: module "QtQuick.Controls" is not installed
    qrc:/test.qml:5:1: module "QtQuick.Controls.Styles" is not installed
    qrc:/test.qml:3:1: module "QtQuick.Window" is not installed
    qrc:/test.qml:1:1: module "QtQuick" is not installed
    qrc:/test.qml:4:1: module "QtQuick.Controls" is not installed
    qrc:/test.qml:5:1: module "QtQuick.Controls.Styles" is not installed
    qrc:/test.qml:3:1: module "QtQuick.Window" is not installed

    I have Qt 5.8.0


  • Lifetime Qt Champion

    Hi,

    You should use the -qml parameter of windeployqt so that it can go parse your application qml files and deploy what's needed to support them.



  • Yes @SGaist , that was the problem.
    The above error appears in qt creator when i have created the new project and i don't understand why.
    I just made a new project and i have copy all the file from the old one to the new one and show this error when i try to launch.
    The old project works fine without any error.
    Do i need to setup something from project configuration ?


  • Lifetime Qt Champion

    Do you mean from Qt Creator ?



  • Yes. I don't remember if i have setup something to my previews project, but the think is the second doesn't work.


  • Lifetime Qt Champion

    Which version of Qt are you using ?

    Did you setup the .pro file the same way ?



  • Yes, i have
    Sorry for my delay. :D
    There was the problem. Now works fine.
    Thank you very much all. :D
    PS: I don't know how to mark as solved this topic.



  • @Adrian.Aioanei

    To mark it as solved.

    TopicTools on the top and select "mark as solved"



  • Thanks @Ni-Sumi :)


Log in to reply