Results 1 to 5 of 5

Thread: Minimum size hint ignored when adding widgets dynamically

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Dec 2009
    Location
    New Orleans, Louisiana
    Posts
    791
    Thanks
    13
    Thanked 153 Times in 150 Posts
    Qt products
    Qt5
    Platforms
    MacOS X

    Default Re: Minimum size hint ignored when adding widgets dynamically

    I don't have any suggestions to resolve the issue unfortunately, but I can confirm that I experienced the exact same behavior you described on my Mac using Qt 5.7.0. Seems like it should work. Interestingly enough, setMaximumSize seems to be honored, so my best guess is it's a bug. I'd suggest that you report it as such.

    Good luck.
    I write the best type of code possible, code that I want to write, not code that someone tells me to write!

  2. #2
    Join Date
    Mar 2016
    Posts
    16
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Minimum size hint ignored when adding widgets dynamically

    "People who get offended should be offended" -- Linus Torvalds

  3. #3
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Minimum size hint ignored when adding widgets dynamically

    I am not sure I understand: you are saying that you can manually resize the window to a smaller size than what the minimum sizes would allow?

    Cheers,
    _

  4. #4
    Join Date
    Dec 2009
    Location
    New Orleans, Louisiana
    Posts
    791
    Thanks
    13
    Thanked 153 Times in 150 Posts
    Qt products
    Qt5
    Platforms
    MacOS X

    Default Re: Minimum size hint ignored when adding widgets dynamically

    @anda_skoa, yes, I used his example code and confirmed that the minimum size is ignored if set via the singleshot timer and honored when set in the constructor. I tried several things to make it work, but could not. I was able to confirm that the maximum size seems to work regardless, so it would seem to be a bug to me.
    I write the best type of code possible, code that I want to write, not code that someone tells me to write!

Similar Threads

  1. Replies: 5
    Last Post: 21st March 2016, 12:29
  2. Replies: 1
    Last Post: 7th April 2015, 07:05
  3. Adding widgets to layout dynamically
    By anbu01 in forum Newbie
    Replies: 2
    Last Post: 15th May 2014, 12:41
  4. Adding widgets dynamically
    By miw in forum Qt Programming
    Replies: 1
    Last Post: 23rd July 2009, 10:31
  5. Adding/removing widgets dynamically...
    By ReilenBlaeyze in forum Newbie
    Replies: 2
    Last Post: 16th February 2006, 10:55

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
  •  
Qt is a trademark of The Qt Company.