qMake: How exactly does qmake interpret the “CONFIG(debug, debug|release)” syntax

In the article you linked to, it’s said in the very beginning that the project file is processed three times. This should answer your first question; since it’s processed three times, your message() is executed three times too. Why is it processed multiple times? Because qmake does not build your project! It only generates build … Read more

QMake – how to copy a file to the output

You can use a qmake function for reusability: # Copies the given files to the destination directory defineTest(copyToDestdir) { files = $$1 for(FILE, files) { DDIR = $$DESTDIR # Replace slashes in paths with backslashes for Windows win32:FILE ~= s,/,\\,g win32:DDIR ~= s,/,\\,g QMAKE_POST_LINK += $$QMAKE_COPY $$quote($$FILE) $$quote($$DDIR) $$escape_expand(\\n\\t) } export(QMAKE_POST_LINK) } then use it … Read more

Qt compiler warning: overriding commands for target / ignoring old commands for target

I got the same error once , maybe source of your problem is different but I will write anyways. In my *.pro file, it was like : SOURCES += main.cpp\ mainwindow.cpp\ serialHelper.cpp \ serialHelper.cpp HEADERS += mainwindow.h\ += serialHelper.h \ serialHelper.h \ typeDefinitions.h cpp and header file was repeating itself. I delete the repeating includes … Read more

Why does Qt use its own make tool, qmake?

Qt uses qmake to transparently support Qt’s various addons, including “moc, the meta-object compiler” (which provides signals & slots), “uic, the ui compiler” (which creates header files from .ui designer files), “rcc, the resource compiler” (which compiles resources). There’s nothing to stop you using any build system you want. however, it’s a lot more work. … Read more

Add a define to qmake WITH a value?

DEFINES += “WINVER=0x0500” works for me. This way, -DWINVER=0x0500 is added to the command line of the compiler, which is the syntax GCC/mingw expects for command line preprocessor definitions (see here for the details).

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)