Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. qt5 to qt6 migration
Forum Updated to NodeBB v4.3 + New Features

qt5 to qt6 migration

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 2 Posters 593 Views 2 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.
  • R Offline
    R Offline
    raj11157
    wrote on last edited by raj11157
    #1

    Hello ,

    I am migrating Qt5 to Qt6. I noticed my custom styles are no longer recognized.

    1. I am getting followed error
      qrc:/main.qml , customesytlename module not installed.
      In Qt5 there was an api related to setStylePath its no longer there on Qt6. Its mentioned as deprecated since styles are considered as modules in qt6.
      Could you please tell me how to set path for the custom styles in Qt6. I defined them in qmldir file but it didnt help.

    Thanks

    JKSHJ 1 Reply Last reply
    0
    • R raj11157

      Hello ,

      I am migrating Qt5 to Qt6. I noticed my custom styles are no longer recognized.

      1. I am getting followed error
        qrc:/main.qml , customesytlename module not installed.
        In Qt5 there was an api related to setStylePath its no longer there on Qt6. Its mentioned as deprecated since styles are considered as modules in qt6.
        Could you please tell me how to set path for the custom styles in Qt6. I defined them in qmldir file but it didnt help.

      Thanks

      JKSHJ Offline
      JKSHJ Offline
      JKSH
      Moderators
      wrote on last edited by
      #2

      Hi, and welcome!

      @raj11157 said in qt5 to qt6 migration:

      qrc:/main.qml , customesytlename module not installed.

      What is the (case-sensitive) name of your style file? Import it using its name, like you would import any other QML module.

      https://doc.qt.io/qt-6/qtquickcontrols-changes-qt6.html says "there is now only one valid, case-sensitive form for style names: "Material", "MyStyle", and so on. That is: the style name must exactly match the name of the QML module. This also applies to file selectors, where previously, all style names were lower case."

      Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

      1 Reply Last reply
      0
      • R Offline
        R Offline
        raj11157
        wrote on last edited by
        #3

        All my Style files are upper case qml files. They were imported as a shared library to my module.
        In qt5 we used "setStylePath" which points to the root directory of qml files.
        Now with the qt6 its complains about module not installed.

        • I have tried to add QmlEngine:addImportPath but it didnt help.
        • I have added all qml files in qmldir and defined the module name it also didnt help.
        JKSHJ 1 Reply Last reply
        0
        • R raj11157

          All my Style files are upper case qml files. They were imported as a shared library to my module.
          In qt5 we used "setStylePath" which points to the root directory of qml files.
          Now with the qt6 its complains about module not installed.

          • I have tried to add QmlEngine:addImportPath but it didnt help.
          • I have added all qml files in qmldir and defined the module name it also didnt help.
          JKSHJ Offline
          JKSHJ Offline
          JKSH
          Moderators
          wrote on last edited by
          #4

          @raj11157 said in qt5 to qt6 migration:

          All my Style files are upper case qml files.

          customesytlename is all lowercase

          Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

          1 Reply Last reply
          1

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved