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. Dock widget resize. Many resize events.

Dock widget resize. Many resize events.

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

    Application uses QMainWindow and some Dock Widgets. Central area is very complex widget, and it takes significant time to re-paint it.

    The user starts to move the dock-window splitter to resize dock window. In Qt3 the resize event comes to the central widget only when resize is finished. So, the central widget is repainted only once. The new dock window size is indicated with XOR-like line during the splitter movement.

    In Qt4 the resize events are continuously sent to central widget during the splitter movement, that causes re-painting of the central widget. The dock windows and central widget are refreshed many times.

    Is it possible to switch back to the Qt3 behavior: to use XOR line instead of immediate generation of resize events? Or any other suggestions how to handle this issue.

    If the function setUpdatesEnabled(false) is called for the central widget (for the period of splitter movement) then garbage appears on the screen. It is unacceptable.


    Oleksiy Balabay

    1 Reply Last reply
    0
    • F Offline
      F Offline
      Franzk
      wrote on last edited by
      #2

      I think you should be able to use rubber band resizing, but I'm not sure how to do that and I didn't find it within five minutes :P. Normally I would say you should implement your paint event to only draw the exposed area, so take heed of the rectangle, or region passed to the paint event. It will significantly improve drawing performance in this case, as long as actually things are exposed. If you are going to be resizing a background there's not much use in this advice.

      "Horse sense is the thing a horse has which keeps it from betting on people." -- W.C. Fields

      http://www.catb.org/~esr/faqs/smart-questions.html

      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