[Qt-interest] QPushbutton size on various platform

Girish Ramakrishnan girish at forwardbias.in
Fri Sep 18 19:16:56 CEST 2009


As Sean said, you need to put your button(s) is a layout. Or do
pushbutton->resize(pushbutton->sizeHint()) in your code.

Girish

Francesco Lamonica wrote:
> Here is a simple widget with a button over it, on windows it holds the
> whole text, on linux just a part of it
> 
> On Fri, Sep 18, 2009 at 5:56 PM, Sean Harmer
> <sean.harmer at maps-technology.com> wrote:
>> On Friday 18 Sep 2009 16:47:02 Francesco Lamonica wrote:
>>> Hi Sean, i just mean the button text :)
>>>
>>> if i set the text to, say, "click-on-me-button" on mac i get displayed
>>> "ck-on-me-but" since there is no more room as if the font was
>>> occupying too much space nad the button geometry was too little (i
>>> dont have access to a mac to get a sshot right now)
>> I think you just need to put your button(s) into a layout. This will query the
>> buttons for their sizeHint()'s and resize them accordingly.
>>
>> Do you have a designer .ui file for your widget that you can post?
>>
>> Sean
>> _______________________________________________
>> Qt-interest mailing list
>> Qt-interest at trolltech.com
>> http://lists.trolltech.com/mailman/listinfo/qt-interest
>>



More information about the Qt-interest-old mailing list