[Interest] Problem sizing a QWidget

Christian Gagneraud chgans at gna.org
Mon Apr 6 23:52:44 CEST 2015


On 07/04/15 09:41, william.crocker at analog.com wrote:
>
>>
>> I know this is not the correct way to go, and is quite inefficient but I
>> could not find another way.
>> Would anyone have some suggestion on how to handle this correctly?
>> Any help would be greatly appreciated.
>>
>
> Looks like I did this at some point in the past:
>
>
> m_Label->setSizePolicy(QSizePolicy::MinimumExpanding,QSizePolicy::MinimumExpanding);
>
>      ...
>
>      m_Label->setText(t);
>      m_Label->adjustSize()

adjustSize() is what I needed.

Thanks a lot William!

Chris

>
> Bill
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>




More information about the Interest mailing list