[Qt-interest] size of QCheckBox
Serge
mb0 at km.ru
Tue Sep 15 12:30:22 CEST 2009
i receive error C2039: 'setRowSpace' : is not a member of 'QGridLayout'
i'm using QT 4.3.3
i found this: setColumnMinimumWidth
but how can i calculate minimum width so that it would be the same, as
space, required to hold QCheckBox with empty text label?
Colin S. Miller wrote:
> Serge wrote:
>> Hello,
>>
>> i have list of frames.
>> each frame contains grid layout with widgets.
>> first column in grid - checkboxes with empty text label.
>>
>> some frames must not contain checkboxes. just empty space.
>> if all cells in column are empty, grid layout makes it very narrow.
>> But i need so that width of layout column without checkboxes would be
>> the same as width of column with checkboxes.
>>
>> How to make it?
>> I tried to make empty frames but they have not same size as checkbox?
>> How to make empty frame/widget with same size as QCheckBox?
>> If make temporary QCheckBox, get it size, and make frames using this
>> size, it is incorrect.
>
> Serge,
> QGridLayout::setRowSpace(int row, int minSize)
> will set the minimum width of a row in a QGridLayout.
>
> If you set this to the width of a QCheckBox that doesn't have text,
> then this should work.
>
> HTH,
> Colin S. Miller
--
Serge
More information about the Qt-interest-old
mailing list