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. After Qt>=5.9, QWidget addWidget QML ApplicationWindow can cause interface drift. Does anyone know how to solve this problem?
Forum Updated to NodeBB v4.3 + New Features

After Qt>=5.9, QWidget addWidget QML ApplicationWindow can cause interface drift. Does anyone know how to solve this problem?

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
7 Posts 2 Posters 609 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.
  • WoHowLearnW Offline
    WoHowLearnW Offline
    WoHowLearn
    wrote on last edited by WoHowLearn
    #1

    https://bugreports.qt.io/browse/QTBUG-67698

    1 Reply Last reply
    0
    • J.HilkJ Offline
      J.HilkJ Offline
      J.Hilk
      Moderators
      wrote on last edited by
      #2

      @WoHowLearn
      like Ulf Hermann said, use a pure QQuickWidget it should solve the issue for your case


      Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


      Q: What's that?
      A: It's blue light.
      Q: What does it do?
      A: It turns blue.

      WoHowLearnW 1 Reply Last reply
      0
      • J.HilkJ J.Hilk

        @WoHowLearn
        like Ulf Hermann said, use a pure QQuickWidget it should solve the issue for your case

        WoHowLearnW Offline
        WoHowLearnW Offline
        WoHowLearn
        wrote on last edited by WoHowLearn
        #3

        @J-Hilk
        It does not working. QWidget cannot addwidget QML Application.
        Like this :
        43e25c0a-1fb6-4c2d-8f69-448ea6418ce3-image.png

        J.HilkJ 1 Reply Last reply
        0
        • WoHowLearnW WoHowLearn

          @J-Hilk
          It does not working. QWidget cannot addwidget QML Application.
          Like this :
          43e25c0a-1fb6-4c2d-8f69-448ea6418ce3-image.png

          J.HilkJ Offline
          J.HilkJ Offline
          J.Hilk
          Moderators
          wrote on last edited by
          #4

          @WoHowLearn did you add
          QT += quickwidgets
          to your project file ? And QQuickWidgets was not imported, as far as I can tell


          Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


          Q: What's that?
          A: It's blue light.
          Q: What does it do?
          A: It turns blue.

          WoHowLearnW 1 Reply Last reply
          0
          • J.HilkJ J.Hilk

            @WoHowLearn did you add
            QT += quickwidgets
            to your project file ? And QQuickWidgets was not imported, as far as I can tell

            WoHowLearnW Offline
            WoHowLearnW Offline
            WoHowLearn
            wrote on last edited by WoHowLearn
            #5

            @J-Hilk

            6c925499-2864-40ad-b53a-844fd0b5f586-image.png

            8c9d7e91-d8f0-4ac5-864f-ce0b2a4297b1-image.png

            The program can run,
            but there is no way to embed a qquickwidget into a qwidget ,
            because the root of QML is ApplicationWindow.

            So that's the only way I can do it.

            5d25374d-70f5-4984-a8a1-7f35e79968f0-image.png

            J.HilkJ 1 Reply Last reply
            0
            • WoHowLearnW WoHowLearn

              @J-Hilk

              6c925499-2864-40ad-b53a-844fd0b5f586-image.png

              8c9d7e91-d8f0-4ac5-864f-ce0b2a4297b1-image.png

              The program can run,
              but there is no way to embed a qquickwidget into a qwidget ,
              because the root of QML is ApplicationWindow.

              So that's the only way I can do it.

              5d25374d-70f5-4984-a8a1-7f35e79968f0-image.png

              J.HilkJ Offline
              J.HilkJ Offline
              J.Hilk
              Moderators
              wrote on last edited by
              #6

              @WoHowLearn said in After Qt>=5.9, QWidget addWidget QML ApplicationWindow can cause interface drift. Does anyone know how to solve this problem?:

              ApplicationWindow

              ok, fair enough, what feature of ApplicationWindow is important for you, that you couldn't replace the rootItem with, say a Rectangle?


              Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


              Q: What's that?
              A: It's blue light.
              Q: What does it do?
              A: It turns blue.

              WoHowLearnW 1 Reply Last reply
              0
              • J.HilkJ J.Hilk

                @WoHowLearn said in After Qt>=5.9, QWidget addWidget QML ApplicationWindow can cause interface drift. Does anyone know how to solve this problem?:

                ApplicationWindow

                ok, fair enough, what feature of ApplicationWindow is important for you, that you couldn't replace the rootItem with, say a Rectangle?

                WoHowLearnW Offline
                WoHowLearnW Offline
                WoHowLearn
                wrote on last edited by
                #7

                @J-Hilk
                I haven't tried substitution.
                But as the QTBUG-67698 last comment says , the exact same code works fine until qt<5.9.

                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