Qt application in windows and linux are same ?
-
I think if you does not use windows api or windows library or any other external or third party library . then it should work on linux as well as windows.
But i am hoping for straight and good reply from SGaist.
-
Hi,
ankursaxena is right. If you used Qt classes only, then you can copy the source code into Linux and compile a Linux executable.
(Note: You cannot copy the Windows executable into Linux)
-
hii
Yes you can ..This is what Qt's main advantage,
Write Once. Deploy Everywhere..
but if you want to deploy on linux then you have to compile your source code on linux as well using Qt ctreator as you compiled in windows.Second thing is that if your source code having some window native api(MSDN)
then you have to use macros like
#ifdef QT_ARCH_MACOSX
//mac code
#else if QT_ARCH_WINDOWS
//window code
#else
//any other code
#endif
hope it will help