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. Detecting any desktop state change
Forum Updated to NodeBB v4.3 + New Features

Detecting any desktop state change

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 797 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.
  • S Offline
    S Offline
    silex92
    wrote on last edited by
    #1

    Hello,

    the requirement is to detect a desktop window visual change starting from a defined time moment.

    In the QPaintEvent documentation there's no exact information when it should be sent.
    However, I assume that it is sent whenever a widget is

    • resized;
    • moved;
    • exposed because a covering widget was moved.

    N.B. !!!
    I do not make assumptions whether a widget should be repainted in Qt if it is either partially or fully covered by a widget.
    However, since the desktop widget is the widget constituting the area for all widgets after an user is logged in and assumed that the widgets are children of the desktop widget, the desktop widget is the first QPaintEvent receival point. Hence, it should receive the QPaintEvent message when it is partially or fully covered.

    The idea is to use the QDesktopWidget class with an event filter expecting a paint event.

    I need thorough information (with sources) whether the assumptions are correct.

    If there is an input regarding the idea or another solution it would be greatly appreciated.

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

      why not jsut relying on Qt?! Qt will send a QPaintEvent when needed. You can initiate a paint event with QWidget::update(), for example when data has changed inside your widget and you need to redraw it.

      --- 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

      • Login

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