QGraphicsView and QWidget with QAnimation cohabitation



  • 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



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

    SOrry for the useless post


  • Lifetime Qt Champion

    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 :)



  • 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


  • Lifetime Qt Champion

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



  • 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


  • Lifetime Qt Champion

    You're welcome !

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


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.