×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Sep 2009
    Posts
    3

    What makes Qt cross platform ?

    Hi,

    What is the technology employed that makes Qt cross platform. I am new to Qt. I use Qt and C++. But since programs written are compiled to native code, how is it cross platform?
    I think its not using a virtual machine. That decision is really cool. And is it like I need to compile the program for different architecture separately?
    Thank You.

  2. #2
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: What makes Qt cross platform ?

    This will be interesting for you:
    http://en.wikipedia.org/wiki/Cross_platform

  3. #3
    Registered User
    Join Date
    Sep 2009
    Posts
    3

    Re: What makes Qt cross platform ?

    Quote Originally Posted by divanov View Post
    This will be interesting for you:
    http://en.wikipedia.org/wiki/Cross_platform
    alright, I got that!

  4. #4
    Nokia Developer Champion
    Join Date
    Nov 2009
    Location
    Minnesota, USA
    Posts
    3,209

    Re: What makes Qt cross platform ?

    "Cross platform" is the holy (holey?) grail of computing -- the ability to "write once, run anywhere". The idea is not so much that there is no need to recompile/rebuild (though that is nice when it's achieved), but that the code does not need to be rewritten or extensively modified to move from one platform to another.

    Like I said, the holy grail -- the effort goes back to COBOL, and even earlier. Back in them olden days it was quite a challenge, since some machines were decimal, some binary, some used EBCDIC, some BCD, some FieldData, some 6-bit TTY code, and, occasionally, ASCII. 4K of RAM was a big machine, and 64K was only seen in the really big shops.

    There are a number of things that need to be done to achieve good cross-platform operation. First, the computational instructions need to be abstracted, smoothing over issues such as word side, byte order, 1s vs 2s complement, etc. Next the storage management and call/return facilities need to be abstracted, and the inter-module linkage facilities. Then the operating system and I/O interfaces need to be abstracted.

    Of course, the more abstraction there is, the more overhead there is to produce it -- I shudder to think what Qt code looks like at the machine language level. But modern machines generally have horsepower to spare, so efficiency is traded off for portability and ease of programming.

    There are few languages/environments that do this really well, and none do it perfectly. Java is probably the best (among the mainstream language environments, at least) for cross-platform portability, but Qt definitely gives Java a run for its money. To a large extent, though, this is facilitated by the larger machines we have now, where programs can routinely run with a major fraction of a GB of working storage and 80-90% of the CPU power "wasted", even in "embedded" environments.

Similar Threads

  1. J2ME Cross Platform problem
    By thechameleon in forum Mobile Java General
    Replies: 6
    Last Post: 2010-12-13, 16:50
  2. Problem adding Java ME MIDP Platform Emulator in NetBeans 6.5
    By furau in forum Mobile Java Tools & SDKs
    Replies: 4
    Last Post: 2010-11-26, 09:42
  3. Senior QT Client Developer (Dublin, Ireland)
    By marynyc in forum News and Announcements
    Replies: 0
    Last Post: 2009-06-02, 18:24

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •