[Qt-interest] Setting all columns of a QHBoxLayout to have the same width
Felipe Sodré Silva
fsodre at gmail.com
Thu Aug 12 18:35:01 CEST 2010
On Thu, Aug 12, 2010 at 12:53 PM, Brad Howes <howes at ll.mit.edu> wrote:
> However, I suspect you want the layout to demand N * maxWidth space for N
> managed widgets where maxWidth is the largest preferred width found among
> the N widgets. I suspect you will have to derive from, say QHBoxLayout, and
> implement your own minimumSize() (and perhaps invalidate() too) which will
> visit all children, ask each for their minimumSize() value, and return the
> largest value found * N plus some margin and spacing values.
>
Hi. Sorry, but I kinda new to Qt, and my biggest problem here is how to get
the maxWidth value. If I have, say, a QRadioButton, how can I know its width
within a QGridLayout, for example? I've tried minimunWidth() but it always
returns zero to me.
Thanks!
Felipe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100812/c914f83c/attachment.html
More information about the Qt-interest-old
mailing list