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. app crashes when a qquickwidget is set into QGraphicsScene
Qt 6.11 is out! See what's new in the release blog

app crashes when a qquickwidget is set into QGraphicsScene

Scheduled Pinned Locked Moved Solved General and Desktop
6 Posts 2 Posters 577 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.
  • JoeCFDJ Offline
    JoeCFDJ Offline
    JoeCFD
    wrote on last edited by
    #1

    A quickwidget is created with a qml file. For testing purpose, it has only a rectangle with an image. It is wrapped in a QWidget streamwidget with some settings for it. This streamwidget can be displayed in a layout of widgets without any problem. But the app crashes when the quickwidget is added to a QGraphicsScene
    QGraphicsScene->setWidget( streamwidget ); ==> crash
    Does anyone have the same problem? I will try a small test later.

    Qt: 5.15.2 and Ubuntu 18.04

    1 Reply Last reply
    0
    • JoeCFDJ JoeCFD

      @SGaist Thanks for your reply. I will try to wrap it in a OpenGL widget and add it to view port of QGraphicsView. Is this what you suggest?

      I have a QGraphicsScene which has a bunch of items and it is set in QGraphicsView. Before, it was a graphics widget and no problem to add it to the scene. Now I replace it with qquickwidget and it can not be added to the scene anymore.

      SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #4

      @JoeCFD no, not wrapping anything, setting the viewport. See the QGraphicsView details.

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

      JoeCFDJ 2 Replies Last reply
      1
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #2

        Hi,

        Do you have the same issue if you use an OpenGL viewport for your view ?

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

        JoeCFDJ 1 Reply Last reply
        0
        • SGaistS SGaist

          Hi,

          Do you have the same issue if you use an OpenGL viewport for your view ?

          JoeCFDJ Offline
          JoeCFDJ Offline
          JoeCFD
          wrote on last edited by JoeCFD
          #3

          @SGaist Thanks for your reply. I will try to wrap it in a OpenGL widget and add it to view port of QGraphicsView. Is this what you suggest?

          I have a QGraphicsScene which has a bunch of items and it is set in QGraphicsView. Before, it was a graphics widget and no problem to add it to the scene. Now I replace it with qquickwidget and it can not be added to the scene anymore.

          SGaistS 1 Reply Last reply
          0
          • JoeCFDJ JoeCFD

            @SGaist Thanks for your reply. I will try to wrap it in a OpenGL widget and add it to view port of QGraphicsView. Is this what you suggest?

            I have a QGraphicsScene which has a bunch of items and it is set in QGraphicsView. Before, it was a graphics widget and no problem to add it to the scene. Now I replace it with qquickwidget and it can not be added to the scene anymore.

            SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #4

            @JoeCFD no, not wrapping anything, setting the viewport. See the QGraphicsView details.

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

            JoeCFDJ 2 Replies Last reply
            1
            • SGaistS SGaist

              @JoeCFD no, not wrapping anything, setting the viewport. See the QGraphicsView details.

              JoeCFDJ Offline
              JoeCFDJ Offline
              JoeCFD
              wrote on last edited by
              #5

              @SGaist Actually I set an empty OpenGLWidget in the viewport. I will try to set the quickwidget there and see what will happen. Will let you know.

              1 Reply Last reply
              0
              • SGaistS SGaist

                @JoeCFD no, not wrapping anything, setting the viewport. See the QGraphicsView details.

                JoeCFDJ Offline
                JoeCFDJ Offline
                JoeCFD
                wrote on last edited by
                #6

                @SGaist I set the wrapper widget to the viewport and it works. Thanks a lot.

                1 Reply Last reply
                0
                • JoeCFDJ JoeCFD has marked this topic as solved on

                • Login

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