Results 1 to 7 of 7

Thread: How to avoid redraw of widgets outside visibleRegion on update? [PyQt5]

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #4
    Join Date
    Aug 2018
    Posts
    9
    Qt products
    Qt5
    Platforms
    Unix/X11

    Arrow Re: How to avoid redraw of widgets outside visibleRegion on update? [PyQt5]

    I couldn't figure out how to shift the slider to one side or the other, so I just made the slider wider than it needed to be and buried the unwanted space under some buttons to the side. (I wanted the hit rect of the slider handle to be larger than the visible handle, because I'm working with a questionable $12 touchscreen, so I added a bunch of invisible padding to it.)

    screenshot.png

    In this screenshot, we see the touch area drawn as green. (This is normally drawn transparent.) Even if you miss the slider by a small margin, you can still drag it without any issue. The green area used to extend out a few pixels to the left and right, so it was even easier to drag. However, this caused the text on the buttons to get redrawn so I narrowed it. But now it's harder to drag.


    Added after 6 minutes:


    Oh, sorry, missed your reply there.

    Quote Originally Posted by d_stranz View Post
    Sounds like maybe the OP isn't using layouts to position the widgets.
    That is correct. Proper layouts are both hard to use and glitchy in Qt Designer. I couldn't resize them, they often resized themselves to inappropriate dimensions, and they didn't survive save/load very reliably. Since I often found myself having to edit the XML output of Designer and reload, I switched to absolute positioning. Due to the fixed-size screen on the product the interface is for, this is acceptable.
    Last edited by DDR; 29th May 2019 at 23:11. Reason: Original post was duplicated after edit.

Similar Threads

  1. Replies: 0
    Last Post: 3rd October 2011, 13:36
  2. Replies: 6
    Last Post: 3rd September 2010, 19:21
  3. how to force widgets update
    By Onanymous in forum Newbie
    Replies: 5
    Last Post: 14th June 2010, 17:37
  4. Replies: 0
    Last Post: 7th August 2009, 16:10
  5. Avoid moving widgets
    By desch in forum Qt Programming
    Replies: 5
    Last Post: 9th April 2009, 06:27

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.