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. Qpaint - Double Buffer
Forum Updated to NodeBB v4.3 + New Features

Qpaint - Double Buffer

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 3 Posters 1.5k Views 1 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.
  • V Offline
    V Offline
    VJ_ERNA
    wrote on last edited by
    #1

    Hi,

    I am very new to QT. I have some requirements, please suggest how to implement it using QT.

    My QT application will get commands and data to draw some rectangles, bitmap etc from an external application. After giving this commands, the external application will give an update command, I have to display the given items to screen on this update command.
    This is a continuous process.So until receiving an update command, I can hide the drawn items and can make it visible on update command.
    My problem is since this is a continuous process, after the first update command some other items also need to be drawn above the first shown screen like the same manner.
    So how can I draw the new items individually over the previous screen and display complete screen on next update command?

    Regards
    VJ

    1 Reply Last reply
    0
    • dheerendraD Offline
      dheerendraD Offline
      dheerendra
      Qt Champions 2022
      wrote on last edited by
      #2

      Use QPixmap or QImage to draw offline. When the new update comes, draw on the same pix/QImage. Show this QPixMap/QImage in paintEvent(..).

      Dheerendra
      @Community Service
      Certified Qt Specialist
      http://www.pthinks.com

      1 Reply Last reply
      3
      • mrjjM Offline
        mrjjM Offline
        mrjj
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi
        You can find some inspiration in
        http://doc.qt.io/qt-5/qtwidgets-widgets-scribble-example.html

        (It paints on image)

        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