Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qt cross platform? How does it work?

Qt cross platform? How does it work?

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 1.3k Views 1 Watching
  • 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.
  • C Offline
    C Offline
    cherple
    wrote on last edited by
    #1

    Hi guys,

    I've tried reading and googling a little, but either im searching it wrongly or it's too simple that's why no one posts this. But how exactly does one use Qt to cross platform? For example if i'm coding a program for windows, by using Qt i can allow my program to work on Linux as well? Or am i wrong? And if so, how exactly do i use Qt to allow my program to cross platform?

    Sorry i am really new to all these. It'd be nice if someone could explain it to me briefly or if there's some simple example.

    Thank you all so much >_<

    1 Reply Last reply
    0
    • O Offline
      O Offline
      oh3netid
      wrote on last edited by
      #2

      You have to recompile your code for each platform you want to deploy on. To get your Windows Qt app to work in Linux, download and setup your Qt SDK environment under Linux and then use it to compile your Qt project. It should give you a Linux executable. The same goes for OSX (you need to setup a Qt build environment in OSX in order to generate a Mac app).

      Generating a single executable that runs on all devices is not possible. But you can generate binaries for any supported platform from the same code base.

      Try installing Qt on various platforms and then compile the sample apps. They are all using the same code but the output (executable binaries) are all specific to that particular OS.

      If you want to compile a Linux version of your app from a Windows development environment, do a search for "cross compiling". I've never done it, so maybe a more experienced person could help you.

      1 Reply Last reply
      0
      • C Offline
        C Offline
        cherple
        wrote on last edited by
        #3

        I see, that's pretty detailed.. Thank you very much. I'll try to read more about it, thanks =]

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved