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. paintevent() called , without update() or repaint()
QtWS25 Last Chance

paintevent() called , without update() or repaint()

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 3 Posters 1.6k 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.
  • Pradeep KumarP Offline
    Pradeep KumarP Offline
    Pradeep Kumar
    wrote on last edited by
    #1

    HI,
    My question is, paintevent() will not get called , untill we call update() or repaint(),

    But paintevent(), is getting called without using update() or repaint(), what am i doing wrong?.

    Thanks,

    Pradeep Kumar
    Qt,QML Developer

    jsulmJ 1 Reply Last reply
    0
    • Pradeep KumarP Pradeep Kumar

      HI,
      My question is, paintevent() will not get called , untill we call update() or repaint(),

      But paintevent(), is getting called without using update() or repaint(), what am i doing wrong?.

      Thanks,

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @Pradeep-Kumar "Paint events are sent to widgets that need to update themselves, for instance when part of a widget is exposed because a covering widget was moved." - http://doc.qt.io/qt-5/qpaintevent.html#details
      Paint event are sent even without anybody calling update() or repaint().

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      2
      • Pradeep KumarP Offline
        Pradeep KumarP Offline
        Pradeep Kumar
        wrote on last edited by
        #3

        is their a solution how can it be resolved, or the is it the behaviour, how it should behave?.

        Thanks,

        Pradeep Kumar
        Qt,QML Developer

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

          Hi,

          That's the normal behaviour, like written in the documentation @jsulm is quoting and linking to: paint events are sent when needed by the OS or you can intentionally trigger them in your application if needed.

          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
          1

          • Login

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