Questions tagged [qmake]

`qmake`, part of the Qt framework, is a tool for generating Makefiles and IDE project files.

qmake, part of the Qt framework, is a multi-platform tool for generating GNU Makefiles, Microsoft Visual Studio project files, and Apple XCode project files from a common .pro project file.

Among other features specific to the Qt framework, qmake automates the process of running moc on source files that contain the Q_OBJECT macro.

qmake manual can be found here for Qt 4.8 and here for Qt 5.

1860 questions
16
votes
6 answers

Cannot run qmake in Mac Terminal

I'm learning Qt for my C++ course at college. I am trying to set up the environment for my first assignment but I can't seem to get it right. I swear I have run qmake in the terminal before, but now since I installed Qt 5.2 with Qt Creator I can't…
Nick Corin
  • 2,214
  • 5
  • 25
  • 46
16
votes
4 answers

Qt 5 Unknown module(s) in QT: uitools

I just started to use Qt today and I don't know if I did something wrong when I installed it but I can't use QFormBuilder. Linux Xubuntu 64b what I did: I clone this repo : git@gitorious.org:qt/qt5.git init_repository >> ./configure >> make >> sudo…
hidewak
  • 299
  • 1
  • 4
  • 16
16
votes
1 answer

How reference Qt Creator current build directory from Qt project file?

Does Qt Creator set a qmake variable containing the build directory that can be referenced from the Qt project file? The Qt Creator Default build directory: ../build-%{CurrentProject:Name}-%{CurrentKit:FileSystemName}-%{CurrentBuild:Name} My goal…
Ed of the Mountain
  • 5,219
  • 4
  • 46
  • 54
16
votes
3 answers

How to run multiple commands with an extra target in QMake

I am making extra targets using qmake, and I'm trying to do two things at the same time: make a new folder, and copy a dll into that folder. Both action separate work fine, but the two together don't work. something.target = this # This works: #…
Yellow
  • 3,955
  • 6
  • 45
  • 74
16
votes
2 answers

How to change qmake PREFIX location

I used below commands to install some stuff. qmake PREFIX=/path/to/my/dir make make install However the path I gave was wrong, how do I update PREFIX to the right location and remove the old install, then install again? I tried: rm -rf…
Stan
  • 37,207
  • 50
  • 124
  • 185
15
votes
4 answers

How to generate .sln/.vcproj using qmake

I have main.cpp in c:\test folder and do the following: qmake -project qmake -tp vc test.pro The answer is: WARNING: Unable to generate output for: C:/test//Makefile.Debug [TEMPLATE vcapp] WARNING: Unable to generate output for:…
stas
  • 631
  • 2
  • 7
  • 9
15
votes
3 answers

Where are variables such as $(MKDIR) and $(COPY_DIR) defined?

I am trying to get hold of the values these variables contain but I couldn't find any informations about them on the web and searching for such strings in C:\Qt folder brought up nothing. Where are these variables defined ?
aybe
  • 15,516
  • 9
  • 57
  • 105
15
votes
4 answers

Qt Cannot open include file: 'QPrinter'

I am new to Qt. Downloaded source code for a Qt application of SourceForge, and tried to build and run it. After working through a few similar problems by adding QT += statements to .pro files, I am stuck on this one: On attempting to build in Qt…
Matt M
  • 151
  • 1
  • 1
  • 6
14
votes
3 answers

how-to add "warnings as error" rule to Qt .pro file?

When I usually work on a C++ project, one of the first things I do is setting up the "treat warning as errors" on my compiler. When using Qt, qmake generates the Makefile for you and doesn't include this option on the compilation commands. I'm…
ereOn
  • 53,676
  • 39
  • 161
  • 238
14
votes
5 answers

Qt .pro file: how to check if I'm compiling with MSVC 2013 toolset?

I've tried this condition, but it doesn't work. How to check for MSVC 2013? win32-msvc2013*{ QMAKE_CXXFLAGS += /FS } I'm using Qt 5.3 Beta which has msvc-2013 mkspec.
Violet Giraffe
  • 32,368
  • 48
  • 194
  • 335
14
votes
5 answers

Qt 5.2 Including External File into an Android Package?

How to include an external file into 'apk' ? Example: There is "123.txt" in the main directory where .pro file exists. What should I add to pro file to put "123.txt" into apk. I tried DEPLOYMENT, DEPLOYMENTFOLDERS. But they only works with Symbian…
user2400925
14
votes
2 answers

Using Clang on Mingw 64bit

I want to have clang in addition to GCC in a MinGW-64bit environment on Windows 7, both using the standard library from gcc. I'm using gcc_x64_4.8.1_win32_seh_rev1 and Qt from http://sourceforge.net/projects/mingwbuilds/. I built clang 3.3 in this…
Mike M
  • 2,263
  • 3
  • 17
  • 31
14
votes
4 answers

How to specify build directory in Qt Creator for shadow build without use of an absolute path?

Absolute paths are ridiculous. All we need - and all we are allowed, by the way - is to use a folder on the same level that the folder containing .pro file for shadow builds. There are bugs otherwise. But you can't just specify ../mingw_debug for…
Sergey Skoblikov
  • 5,811
  • 6
  • 40
  • 49
13
votes
3 answers

Make qmake use qt5 by default

I have both qt4 and qt5 on my Linux system. qt4 is used by default. What is a clean way to change that so that qmake uses qmake-qt5 by default?
niko
  • 1,128
  • 1
  • 11
  • 25
13
votes
6 answers

Change Qt install path after building?

how can I change Qt install path after I building it ? Example : qmake.exe search binaries to original install path, how can I change/redefine it ? Thanks. Edit : I finally found this patch to apply to Qt…
bernedef
  • 699
  • 2
  • 12
  • 22