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. Not able to use QtQuick.controls elements
Forum Updated to NodeBB v4.3 + New Features

Not able to use QtQuick.controls elements

Scheduled Pinned Locked Moved Solved QML and Qt Quick
7 Posts 2 Posters 665 Views 1 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.
  • F Offline
    F Offline
    firen
    wrote on last edited by
    #1

    Hello,

    sorry for this long and stupid question, but I am realy frustrated...

    I tried today to work a bit with qml. I took as a reference this video https://www.youtube.com/watch?v=ZUjHmamwTJA

    I installed Qt-creator etc. and if i run one of the code-examples everything works fine.

    So now i would like to do the same like in the video, but i am not able to work with QtQuick.controls.

    What I am exactly doing is:

    1. Create a new project of kind: QtQuick application (empty) with Buildsystem qmake and as kit Qt 6.1.1 MinGW 64 Bit
    2. If I run this I see the "Hello World" default Window (so far so good!)
    3. Now I add a QtQuick UI-File. This seems to generate a qml file and a ui.qml file
    4. After this I get the Designer with the loaded ui.qml file
    5. Now I want to add some buttons and thinks like in the video (it seems my Qt-creator version is newer than in the video (Qt Creator 4.15.1 Based on Qt 5.15.2 (MSVC 2019, 64 bit)
    6. After this i search in "components" for controls and I find for example QtQuick.Controls.Basic and QtQuick.Controls.Basic.Impl why are there impl and no impl? What does that mean?
      Anyway I get nothing to work. I cant just add QtQuick.controls components there because they dont show up.
      I see the components of controls if I add "import QtQuick.Controls 2.5" manually to the ui.qmp-file
      But if I try to drag and drop one element into the formular editor I get:

    2021-06-26 17_28_28-.png

    Should I be able to load the basic main.qml file in the designer? or only ui.qml-Files. Because if I try this I get an error in the first line, that the emulator crashes

    Is maybe something with my installation wrong? (I choosed the default one)

    1 Reply Last reply
    0
    • F Offline
      F Offline
      firen
      wrote on last edited by firen
      #2

      okay after a long search (and a simple try on my business notebook where everything works fine) I came across this:

      https://bugreports.qt.io/browse/QTCREATORBUG-23455

      I set the enviroment variables and restartet the system but nothing changed.

      I also tried to update my CPU driver to get a newer version of OPENGL but I already have the newest one from 2016... :-(

      So my last attempt is to use an older version of qt and the creator or maybe i need a new notebook...

      mrjjM 1 Reply Last reply
      0
      • F firen

        okay after a long search (and a simple try on my business notebook where everything works fine) I came across this:

        https://bugreports.qt.io/browse/QTCREATORBUG-23455

        I set the enviroment variables and restartet the system but nothing changed.

        I also tried to update my CPU driver to get a newer version of OPENGL but I already have the newest one from 2016... :-(

        So my last attempt is to use an older version of qt and the creator or maybe i need a new notebook...

        mrjjM Offline
        mrjjM Offline
        mrjj
        Lifetime Qt Champion
        wrote on last edited by mrjj
        #3

        @firen

        Hi
        I think you had a paste whoops as the link goes to here. this post.

        Are you using Qt 6?

        Older info might not apply to the Qt6 as they used the milestone version to streamline Qt for
        next gen.

        Ps. If you can run any QML examples. then you dont need new laptop :)

        F 1 Reply Last reply
        0
        • mrjjM mrjj

          @firen

          Hi
          I think you had a paste whoops as the link goes to here. this post.

          Are you using Qt 6?

          Older info might not apply to the Qt6 as they used the milestone version to streamline Qt for
          next gen.

          Ps. If you can run any QML examples. then you dont need new laptop :)

          F Offline
          F Offline
          firen
          wrote on last edited by
          #4

          @mrjj Thanks for the hint, I updated the link :-)

          I am relative sure that my problem goes in the same direction like the error in the link. Do you have any idea what I could do except QT_OPENGL=software ?

          Another attempt would be to use an oder Qt-Version 5.X could that help?

          mrjjM 1 Reply Last reply
          0
          • F firen

            @mrjj Thanks for the hint, I updated the link :-)

            I am relative sure that my problem goes in the same direction like the error in the link. Do you have any idea what I could do except QT_OPENGL=software ?

            Another attempt would be to use an oder Qt-Version 5.X could that help?

            mrjjM Offline
            mrjjM Offline
            mrjj
            Lifetime Qt Champion
            wrote on last edited by
            #5

            @firen
            Hi
            Yes Using Qt5.15 should just work.
            At least i not seen any mention of drag and drop giving errors.

            Else wait a bit and see if others can give concrete advice. Im more of a QWdigets guy so not been
            following QML lately.

            1 Reply Last reply
            0
            • F Offline
              F Offline
              firen
              wrote on last edited by
              #6

              @mrjj everything works fine with Qt 5.15... oh man so much trouble with such a simple solution...

              Anyway thanks!

              mrjjM 1 Reply Last reply
              0
              • F firen

                @mrjj everything works fine with Qt 5.15... oh man so much trouble with such a simple solution...

                Anyway thanks!

                mrjjM Offline
                mrjjM Offline
                mrjj
                Lifetime Qt Champion
                wrote on last edited by
                #7

                @firen
                Good to hear.
                Yeah, Qt6 is still WIP. Not sure if it was supposed to work or simply missing or what
                it was you experienced.

                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