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. QGraphicsView and QWidget with QAnimation cohabitation

QGraphicsView and QWidget with QAnimation cohabitation

Scheduled Pinned Locked Moved General and Desktop
7 Posts 2 Posters 2.0k 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.
  • S Offline
    S Offline
    sebastienlg
    wrote on last edited by
    #1

    Hello,

    A problem occurs when I moved from Qt4.8 to Qt5.3 in my windows application.

    I have a QGraphicsView and a widget ( with simple buttons ) with a QPropertyAnimation--.

    The QWidget animation doesn't work properly when a QGLgraphicsView has the a same parent. The paint event is not call during all the animation.

    QGraphicsView* view = new QGraphicsView(this);

    TilesMenu* tm = new TilesMenu(this);

    ---->Doesn't work

    When I remove the QGLgraphicsView from the app, the animation works properly. The paint event is call during all the animation time.

    //QGraphicsView* view = new QGraphicsView(this);

    TilesMenu* tm = new TilesMenu(this);

    ---->Animation works

    Do you have any idea of what's happening ?

    Thanks for you help

    1 Reply Last reply
    0
    • S Offline
      S Offline
      sebastienlg
      wrote on last edited by
      #2

      I'm stupid. I found that it was comming from my QGraphicsView and not from the original *

      SOrry for the useless post

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi and welcome to devnet,

        Cool you found out by yourself !

        Can you also please update the thread title prepending [solved] so other forum users may know a solution has been found :)

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

        1 Reply Last reply
        0
        • S Offline
          S Offline
          sebastienlg
          wrote on last edited by
          #4

          OK, I answered maybe too fast. I still have a problem and I identified it more precisely.

          When I add a viewport to a QGraphicsView, the paint event is not sended correctly to other widget with animations

          QGraphicsView* n = new QGraphicsView(this);
          n->setViewport(new QGLWidget(QGLFormat(QGL::DoubleBuffer),this));

          Do you have any idea ?

          thanks

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #5

            To be sure I understand correctly, if you set a QGLWidget as viewport it doesn't work otherwise it's fine ?

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

            1 Reply Last reply
            0
            • S Offline
              S Offline
              sebastienlg
              wrote on last edited by
              #6

              Hi SGaist,

              I spoke with the qt support and my bug is now deteted and reported here :

              https://bugreports.qt-project.org/browse/QTBUG-40786

              Thanks for your help

              1 Reply Last reply
              0
              • SGaistS Offline
                SGaistS Offline
                SGaist
                Lifetime Qt Champion
                wrote on last edited by
                #7

                You're welcome !

                Once the bug is fixed, don't forget to update the thread title ;)

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

                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