Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

QGraphicsView render add processbar



  • I want add a processbar in the QGraphicsView render(),but it is not virtual, who can tell me how to do.


  • Moderators

    what is a processbar? Or do you mean QProgressBar?
    How do you want to appear it exactly.
    Basically you do not need to reimplement the render() method but rather it's paint methods:

    • paintEvent()
    • drawBackground()
    • drawForeground()

    But better would be to add a QGraphicsItem into the view.



  • Think you, I mean QProgressBar.
    Because of I add a lot of QGraphicsItem int QGraphicsScene, and I want to use render() to export them in a image, it will spend a lot of time.
    I read assistan again, I will try to reimplement drawItems() to solve this problem.


Log in to reply