![]() ![]() Other architectures are likely to use different package names, but you certainly get a similar effect. ![]() Debian and Ubuntu use the qt5-default package which directly depends on qtchooser which includes qmake. Qmake is pretty much always installed whenever you install Qt. There are a few I use:īefore testing the version, you probably want to verify that Qt is installed. Thats all you have to do for writing and compiling your first program in QT.The Qt library version can be retrieved in all sorts of ways, using your command line or C++ code. qmake will use pro file generated in 1st step to generate qt]$ qmakeģ) Last step is to run make to generate executable of your qt]$ make You can edit the pro file generated as per your needs too.Ģ) Next step is to generate Makefile. pro file manually or instruct qmake to generate it for you as qt]$ qmake -project A basic project file contains information about the application, for example, which files are needed to compile the application, and which configuration settings to use. Now, just move to directory where you have written your code, and run follwing 3 commands:ġ) qmake uses information stored in project (.pro) files to determine what should go in the makefiles it generates. To make qmake available to your comilation environment, You need to set path to qmake in your PATH qt]$ export PATH=$PATH:/usr/lib/qt4/bin/Īnother variable that you need to be in place is QTDIR, so that your code can be linked with respective qt qt]$ export QTDIR=/usr/lib/qt4 qmake automates the generation of Makefiles so that only a few lines of information are needed to create each Makefile. qmake is a tool that helps simplify the build process for development project across different platforms. To generate Makefile for your code, utility known as qmake is used. You can create the most common “Hello World” program for testing as: Post installation, you need to develop a code in QT. You can use following set of commands to get packages : yum not only installs the above packages but also resolves the corresponding dependencies as well. The easiest way to get above packages installed on your system is using yum. The pre-requisites for doing development in QT on Linux Platform are Ĭ) qt creator (optional, if you want to use IDE for development) You need to follow step by step approach to get your first program in QT done. Here, we will see how to compile a program written using QT API. you can develop your app on one platform and get it compiled for some other platform using cross compilation… QT is fascinating as well as easy to use API. You can code in QT on windows/linux/mac and this is not it. As the logo says… Code Less, Create more, Deploy everywhere… the biggest advantage of QT is that it is multi-platform language. QT is one of the most commonly used API (in C++) for developing standalone graphical apps on Linux. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
June 2023
Categories |