[SOLVED] How to use QtWinExtras in cross-platform application
Should i seperate module and header includes with conditionals like
/// .pro file win32:QT += winextras /// .cpp file #ifdef Q_OS_WIN #include <QtWin> #endif /// ... later #ifdef Q_OS_WIN QWinTaskbarButton *taskbarButton = new QWinTaskbarButton(this); #endif
or can i omit those conditionals?
Yes you should, these are platform dependent code
if you implement all and only your Windows specific functions in one .cpp file you can also avoid to compile it with
win32:SOURCES += myfunctions_win.cpp