Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. The minimum width and height of a QWidget when Qt creator used
Forum Updated to NodeBB v4.3 + New Features

The minimum width and height of a QWidget when Qt creator used

Scheduled Pinned Locked Moved Qt Creator and other tools
2 Posts 2 Posters 2.6k 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.
  • S Offline
    S Offline
    sraju
    wrote on last edited by
    #1

    Dear Experts,

    I have been working on an application where in which I was trying to design a widget with 480*15 pixels size.
    I am using Qt creator in Linux and observed following things:

    a. Create a new Qt GUI Application Project with QWidget as base widget.
    b. Try to change the height of the widget to 15
    c. Failed to set it to 15. Instead it was setting always 16.

    Note: I had observed one more thing that, when I change the Minimum Size to default size by pressing "Red backward arrow" it was setting to 16*16.

    So , does it mean we cannot set the size of the widget not less than 16 pixels height and width? If so, where can I see the reference document for the same?

    What is the best way to set the height of the widget which is less than 16 pixels?

    1 Reply Last reply
    0
    • J Offline
      J Offline
      Jan-Willem
      wrote on last edited by
      #2

      Well, I'm certainly not an expert, but you did use widget.resize(yoursize)?
      Some other values might be important, such as the widget.minimumsize, the widget.sizehint and the same value(s) in a layout if you have one set on your widget.

      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