Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Qt application in windows and linux are same ?

    General and Desktop
    4
    4
    691
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • E
      ecmanja last edited by

      Hi all,
      i have did a simple Qt application using TCP/IP communication in windows ,but is this same application works in linux platform also ?? please confirm me about the issue.

      Thanks & Regards,
      Manju

      1 Reply Last reply Reply Quote 0
      • A
        ankursaxena last edited by

        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.

        1 Reply Last reply Reply Quote 0
        • JKSH
          JKSH Moderators last edited by

          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)

          Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

          1 Reply Last reply Reply Quote 0
          • IamSumit
            IamSumit last edited by

            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

            Be Cute

            1 Reply Last reply Reply Quote 0
            • First post
              Last post