Skip to Content
Hands-On GUI Programming with C++ and Qt5
book

Hands-On GUI Programming with C++ and Qt5

by Lee Zhi Eng
April 2018
Intermediate to advanced
404 pages
8h 27m
English
Packt Publishing
Content preview from Hands-On GUI Programming with C++ and Qt5

Platform-specific settings

You can set different configurations or settings for different platforms, since not every setting can fit all use cases. For example, if we want to include different header paths for different operating systems, we can do the following:

win32:INCLUDEPATH += "C:/mylibs/extra headers" 
unix:INCLUDEPATH += "/home/user/extra headers" 

Alternatively, you can also put your settings in curly braces which behave like the if statements in a programming language:

win32 { 
    SOURCES += extra_code.cpp 
} 
You can check out all the settings you can use in your project file by visiting the following link: http://doc.qt.io/qt-5/qmake-variable-reference.html.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

C++ GUI Programming with Qt 4

C++ GUI Programming with Qt 4

Jasmin Blanchette, Mark Summerfield

Publisher Resources

ISBN: 9781788397827Supplemental Content