Results 1 to 2 of 2

Thread: Window resize problem on Windows XP

  1. #1
    Join Date
    Feb 2007
    Posts
    73
    Thanks
    11
    Thanked 5 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Window resize problem on Windows XP

    I'm having difficulty getting a window to resize smaller than 125 pixels in width on Windows XP. I'm trying to build a control panel and want to allow the user to collapse it to a minimum width.

    When the user presses the collapse "button" (really a label), a slot in the window gets called in which all widgets are hidden, except the collapse "button". On Linux this is all I need to do to get the bar to resize to a minimum width of, around 30 pixels. But on windows it doesn't change size at all. I added calls to resize in the slot and still no reduction in width on windows.

    I've attached an example. If my min/max widths are bigger, than calling resize in the slot works (it must be called to affect a change in width on Windows). The example doesn't include bigger min/max widths, but I tried this out to see if I could find the culprit.

    Any help here would be greatly appreciated. I'd hate to have to revert to having 2 windows - one in a collapsed state and one not, which I could alternately hide/show...

    Thanks in advance.

    P.S. Using Qt 4.6.0
    Attached Images Attached Images
    Attached Files Attached Files

  2. #2
    Join Date
    Feb 2007
    Posts
    73
    Thanks
    11
    Thanked 5 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Thumbs up Re: Window resize problem on Windows XP

    In this example, the resize() method doesn't behave correctly on Windows. Using QWidget::adjustSize does the trick.

Similar Threads

  1. Qt resize child Window...
    By Peppy in forum Qt Programming
    Replies: 6
    Last Post: 12th December 2009, 12:53
  2. A bug in window resize
    By elcuco in forum Qt Programming
    Replies: 2
    Last Post: 6th December 2009, 01:04
  3. Replies: 11
    Last Post: 11th August 2008, 09:14
  4. Double click resize window disable
    By MarkoSan in forum Qt Programming
    Replies: 3
    Last Post: 13th May 2008, 11:35
  5. How to resize window with pushbutton
    By kaydknight in forum Newbie
    Replies: 2
    Last Post: 13th January 2007, 12:17

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.