Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Update QtQuickControls - rename all imports ?

Update QtQuickControls - rename all imports ?

Scheduled Pinned Locked Moved Solved QML and Qt Quick
4 Posts 3 Posters 744 Views 3 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.
  • ekkescornerE Offline
    ekkescornerE Offline
    ekkescorner
    Qt Champions 2016
    wrote on last edited by
    #1

    what's the recommended way to deal with new versions,
    per example using Qt 5.7
    import QtQuick.Controls 2.0

    and updating to Qt 5.8

    should I rename all imports from
    import QtQuick.Controls 2.0 to import QtQuick.Controls 2.1 ?

    ekke ... Qt Champion 2016 | 2024 ... mobile business apps
    5.15 --> 6.9 https://t1p.de/ekkeChecklist
    QMake --> CMake https://t1p.de/ekkeCMakeMobileApps

    1 Reply Last reply
    0
    • jpnurmiJ Offline
      jpnurmiJ Offline
      jpnurmi
      wrote on last edited by
      #2

      Technically, it's not necessary to touch the import versions except in those files where you want to use new types or properties that are not available in the older version. It's up to you whether you prefer to apply minimal changes and that way create a mixture of import versions, or if you want to bump all the import versions to keep them consistent across the code base.

      Considering the hard to remember QML versions, it's a real shame that it's mandatory to specify the minor version at all. It would be nice to be able to optionally specify just the major version, or no version at all, and just get the latest, right? :)

      ekkescornerE 1 Reply Last reply
      1
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Sounds like a nice feature request... Doesn't it ? ;)

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0
        • jpnurmiJ jpnurmi

          Technically, it's not necessary to touch the import versions except in those files where you want to use new types or properties that are not available in the older version. It's up to you whether you prefer to apply minimal changes and that way create a mixture of import versions, or if you want to bump all the import versions to keep them consistent across the code base.

          Considering the hard to remember QML versions, it's a real shame that it's mandatory to specify the minor version at all. It would be nice to be able to optionally specify just the major version, or no version at all, and just get the latest, right? :)

          ekkescornerE Offline
          ekkescornerE Offline
          ekkescorner
          Qt Champions 2016
          wrote on last edited by
          #4

          @jpnurmi yep - sounds like a nice feature to do it without a version and get the latest.

          think I'll do a rename to keep versions consistent and to be sure all qml files 'know' the newest properties

          ekke ... Qt Champion 2016 | 2024 ... mobile business apps
          5.15 --> 6.9 https://t1p.de/ekkeChecklist
          QMake --> CMake https://t1p.de/ekkeCMakeMobileApps

          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