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



  • 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?



  • 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.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.