Results 1 to 4 of 4

Thread: Puzzle about write and compile in different version?

  1. #1
    Join Date
    May 2010
    Posts
    42

    Question Puzzle about write and compile in different version?

    Hi guys!
    I came across a problem about write and compile in different version.The problem is that i write a Qt program in low Qt version,and compile in hight version.if it can make it?
    and if i write in hight Qt version,and compile in low version.If it can make it? I want to know last is that if there is anything else constraints?

  2. #2
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

    Default Re: Puzzle about write and compile in different version?

    I don't think I understand you completely.

    Qt4 should be backwards binary compatible over its lifetime. This means that a program written with Qt4.1 should run with Qt4.7 libraries. But a program written with Qt4.7 is not compatible with Qt4.1 libraries. Note though that there are a few "booby traps". QThread for example is one of those. The behavior changed somewhere around Qt4.4 I think. And there might be other behavior changes.

    In other words, if you write your code with Qt4.5, the minimum version of Qt installed on the user's pc should be Qt4.5

  3. #3
    Join Date
    May 2010
    Posts
    42

    Default Re: Puzzle about write and compile in different version?

    Quote Originally Posted by tbscope View Post
    I don't think I understand you completely.

    Qt4 should be backwards binary compatible over its lifetime. This means that a program written with Qt4.1 should run with Qt4.7 libraries. But a program written with Qt4.7 is not compatible with Qt4.1 libraries. Note though that there are a few "booby traps". QThread for example is one of those. The behavior changed somewhere around Qt4.4 I think. And there might be other behavior changes.

    In other words, if you write your code with Qt4.5, the minimum version of Qt installed on the user's pc should be Qt4.5
    But i have written a program in Qt4.6.2,and it can be compiled in Qt4.5

  4. #4
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

    Default Re: Puzzle about write and compile in different version?

    Quote Originally Posted by Raul View Post
    But i have written a program in Qt4.6.2,and it can be compiled in Qt4.5
    It can under the condition you only use code that is available to Qt4.5
    If you use any new classes or members introduced in Qt4.6, you'll get compiler errors.

Similar Threads

  1. Replies: 2
    Last Post: 2nd November 2010, 05:15
  2. puzzle about change QModelIndex's position?
    By Raul in forum Qt Programming
    Replies: 3
    Last Post: 27th October 2010, 09:54
  3. puzzle about toolkits and frameworks
    By Raul in forum General Programming
    Replies: 1
    Last Post: 24th July 2010, 09:05
  4. Puzzle Example on Qt's website
    By yakuzan in forum Newbie
    Replies: 1
    Last Post: 27th May 2010, 05:43
  5. An example puzzle me, please help
    By HelloDan in forum Newbie
    Replies: 6
    Last Post: 8th March 2009, 08:47

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.