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. [Solved] QWidget::minimumSize vs QWidget::minimumSizeHint

[Solved] QWidget::minimumSize vs QWidget::minimumSizeHint

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 1.6k Views
  • 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.
  • J Offline
    J Offline
    Jakob Schou Jensen
    wrote on 10 Apr 2015, 11:23 last edited by Jakob Schou Jensen
    #1

    What is the difference between QWidget::minimumSize and QWidget::minimumSizeHint? Do they mean the same? If so, when should I prefer one over the other?

    Thanks,

    Jakob

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mcosta
      wrote on 10 Apr 2015, 11:39 last edited by
      #2

      HI and welcome to the devnet,

      QWidget::minimumSizeHint is used when you use the widget inside a layout, QWidget::minimumSize is more generic (for example a resizable widget without layout).

      You have to choose the one to use depending to what you need.

      Once your problem is solved don't forget to:

      • Mark the thread as SOLVED using the Topic Tool menu
      • Vote up the answer(s) that helped you to solve the issue

      You can embed images using (http://imgur.com/) or (http://postimage.org/)

      1 Reply Last reply
      0
      • J Offline
        J Offline
        Jakob Schou Jensen
        wrote on 13 Apr 2015, 07:16 last edited by
        #3

        Ah, I see. QWidget::minimumSize (and maximumSize) actually limits what can through QWidget::setGeometry().

        Thanks

        1 Reply Last reply
        0

        1/3

        10 Apr 2015, 11:23

        • Login

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