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 render add processbar

QGraphicsView render add processbar

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 888 Views
  • 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.
  • C Offline
    C Offline
    cwc1987
    wrote on last edited by
    #1

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

    1 Reply Last reply
    0
    • raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on last edited by
      #2

      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.

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      1 Reply Last reply
      0
      • C Offline
        C Offline
        cwc1987
        wrote on last edited by
        #3

        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.

        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