Results 1 to 3 of 3

Thread: Import QtQuick 2.0 or 2.1 or 2.2?

  1. #1
    Join Date
    Aug 2006
    Posts
    250
    Thanks
    19
    Thanked 49 Times in 36 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Import QtQuick 2.0 or 2.1 or 2.2?

    Not really an issue, but since 5.2 is out now, I notice that Qt Creator autocomplete gives me the option of importing either QtQuick 2.0 or 2.1 or 2.2.
    My old code is importing QtQuick 2.0, some newer parts are importing 2.1, and now I could import 2.2.

    Is there a best practice here? Would it cause problems if some files are importing different versions of QtQuick? Does it cause more memory usage?

    Would it be good practice since I'm now using Qt 5.2 to change all imports to QtQuick 2.2? What is the risk of changed behaviour by changing the import version?

    Any thoughts appreciated.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,360
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Import QtQuick 2.0 or 2.1 or 2.2?

    Quote Originally Posted by pherthyl View Post
    Would it cause problems if some files are importing different versions of QtQuick?
    No.

    Does it cause more memory usage?
    No.

    Would it be good practice since I'm now using Qt 5.2 to change all imports to QtQuick 2.2?
    If you code works with 2.0 import, I'd leave it as it is.

    What is the risk of changed behaviour by changing the import version?
    The problem is only if you change a higher version of an import into a lower one as some things might stop working.

    All what I wrote only applies to differences in minor numbers. For major numbers this might not be true -- e.g. QtQuick 1.1 and QtQuick 2.0 are not 100% compatible.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. The following user says thank you to wysota for this useful post:

    pherthyl (9th January 2014)

  4. #3
    Join Date
    Aug 2006
    Posts
    250
    Thanks
    19
    Thanked 49 Times in 36 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Import QtQuick 2.0 or 2.1 or 2.2?

    Thank you very much. The OCD in me wants all the imports to be consistent, but this is very helpful.

Similar Threads

  1. QtQuick and C++ datamodel
    By creation in forum Qt Quick
    Replies: 5
    Last Post: 28th July 2013, 12:12
  2. QtQuick structure
    By codeman in forum Qt Quick
    Replies: 4
    Last Post: 21st May 2013, 10:35
  3. QtQuick 2.1
    By shadowroot in forum Qt Quick
    Replies: 1
    Last Post: 6th April 2013, 08:44
  4. What is QtQuick/QML really for?
    By Huk in forum Qt Quick
    Replies: 7
    Last Post: 21st June 2012, 20:33
  5. Designer or QtQuick?
    By Jeffb in forum Qt Quick
    Replies: 5
    Last Post: 9th August 2011, 06:38

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.