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()
Forum Updated to NodeBB v4.3 + New Features

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

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 3 Posters 1.6k Views 2 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.
  • P Offline
    P Offline
    Pradeep Kumar
    wrote on 24 Apr 2017, 11:41 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

    J 1 Reply Last reply 24 Apr 2017, 11:44
    0
    • P Pradeep Kumar
      24 Apr 2017, 11:41

      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,

      J Offline
      J Offline
      jsulm
      Lifetime Qt Champion
      wrote on 24 Apr 2017, 11:44 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
      • P Offline
        P Offline
        Pradeep Kumar
        wrote on 24 Apr 2017, 11:46 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
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 24 Apr 2017, 11:56 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

          1/4

          24 Apr 2017, 11:41

          • Login

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