The application version i setted it is not displayed on the properties of the created .exe file.
I use cmake not .pro file.
QApplication::setApplicationVersion("1.0.0");
Related
I'm getting this message when I try to add any resource to the project via Add > Qt resource file
Qt Creator v8.0.1 Qt 6.3.1
How could I set it to add the files automatically?
I also have no 'resources' folder under the project tab.
I have opened a CMake project using QtCreator. The project builds successfully; however, I cannot see the source tree in the repository browser. My question is, how do I make the source tree visible in QtCreator after importing a CMake project?
Qt won't show files in the projects tab if they aren't used as a source for some target. If you add your source files path to CMakeLists.txt add_executable(), they will show up correctly.
The path to the static Qt library is wrongly setup by cmake under QtCreator (windows):
it should be C:\Qt\Qt5.2.0\msvc2012-static_64\qtbase
instead it get configured to D:\GitHub\MyProject where the project lives.
So linking fails.
Here is what i checked so far:
The QTDIR environnement var is correctly set by QtCreator to C:\Qt\Qt5.2.0\msvc2012-static_64\qtbase
The project works well with a dynamic version of Qt 5.1.1, both with QtCreator 2.8 and 3.0
For what i understand, the cmake command find_package(Qt5Widgets REQUIRED) is responsible for finding and including the Qt modules.
Here is the corresponding part of CmakeCache.txt:
//The directory containing a CMake configuration file for Qt5Core.
Qt5Core_DIR:PATH=C:/Qt/Qt5.2.0/msvc2012-static_64/qtbase/lib/cmake/Qt5Core
//The directory containing a CMake configuration file for Qt5Gui.
Qt5Gui_DIR:PATH=C:/Qt/Qt5.2.0/msvc2012-static_64/qtbase/lib/cmake/Qt5Gui
//The directory containing a CMake configuration file for Qt5Multimedia.
Qt5Multimedia_DIR:PATH=C:/Qt/Qt5.2.0/msvc2012-static_64/qtbase/lib/cmake/Qt5Multimedia
//The directory containing a CMake configuration file for Qt5Network.
Qt5Network_DIR:PATH=C:/Qt/Qt5.2.0/msvc2012-static_64/qtbase/lib/cmake/Qt5Network
//The directory containing a CMake configuration file for Qt5Widgets.
Qt5Widgets_DIR:PATH=C:/Qt/Qt5.2.0/msvc2012-static_64/qtbase/lib/cmake/Qt5Widgets
Here is what's shown in QtCreator (v3.0.0):
The missing icons indicate that the file has not been found by QtCreator.
When i right click on one of them and click on "Show in Explorer", it opens the explorer in "Computer"(where you see all your drives) so not on the right place !
I already spent a few days on the problem, any idea is welcome :)
I created a widget in Qt designer. After generating .ui file , now I want to compile it in qt creator. The .ui file is opened but run, build, debug .etc button are not enabled. How can I run this in qt creator? Creating a project and pasting .ui file into the project directory doesn't work. Thanks.
The ui file must be added to the FORMS section of the .pro file.
FORMS+=yourfile.ui
The build step uses the /bin/uic command in the Qt directory (so you could conceivably do this manually from the command line outside of the IDE) to convert the .ui into a .h and a .cpp file (yourfile.ui becomes ui_yourfile.h).
i wrote a program in Qt-Creator 1.3.1 and Qt 4.6.2
and realy dont figure out how to create a simple .exe file for the program i just wrote...
i rather do it with the Qt-Creator if it's possible
In Qt Creator, when you build (Ctrl+B) your project, it always creates a .exe that is executed when you run the app from Qt Creator (Ctrl+R or the big play button).
If you want to find this .exe, you should look in the folder where your .pro (the project file) is located in the folder debug (or release depending on your build configuration).
#Live is right. See in release or debug dir. But if you move the .exe and want to execute you will get notofications about DLL's that miss. You can find them from yout Qt installation dir. Put next to your exe file all required DLL's and you're done! The DLL files will tell your your exe file while you execute it!