c++ - How to use QtWinExtras in cross-platform application -


should seperate module , header includes 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 omit conditionals?

if want compile project multiple platforms, should use them in conditional manner. that's because modules winextras, x11extras, macextras , androidextras available specific os. example on linux, qmake give errors when making project uses winextras.

unless want compile specific platform there no need make conditional. depends on , use case.


Comments

Popular posts from this blog

cakephp - simple blog with croogo -

How to group boxplot outliers in gnuplot -

bash - Performing variable substitution in a string -