Update QtQuickControls - rename all imports ?

  • Qt Champions 2016

    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 ?

  • 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? :)

  • Lifetime Qt Champion

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

  • Qt Champions 2016

    @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

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.