View previous topic :: View next topic |
Author |
Message |
Carlos
Joined: 19 Mar 2004 Posts: 396 Location: Canyon, TX
|
Posted: Thu Apr 07, 2005 9:11 pm Post subject: Two suggestions |
|
|
I think Qt has a special component that is invisible but uses as much space as possible. This component would allow to do something like this:
Code: |
+----------------------------------------+
| +-----+ +------+ +------+ |
| | | | | <~~~~~~~~~~> | | |
| +-----+ +------+ +------+ |
+----------------------------------------+
|
This could work great with a FlowLayout.
I never thought it could be useful until I needed it today.
Also, would it be possible to extend TableLayout so we could specify exactly in which cell we want each component? |
|
Back to top |
|
|
BenHinkle
Joined: 27 Mar 2004 Posts: 76
|
Posted: Fri Apr 08, 2005 9:08 am Post subject: Re: Two suggestions |
|
|
[quote="Carlos"]I think Qt has a special component that is invisible but uses as much space as possible. This component would allow to do something like this:
Code: |
+----------------------------------------+
| +-----+ +------+ +------+ |
| | | | | <~~~~~~~~~~> | | |
| +-----+ +------+ +------+ |
+----------------------------------------+
|
This could work great with a FlowLayout.
I never thought it could be useful until I needed it today.
[\quote]
One can tell FlowLayout to flip over and start laying out from the other side and I intended that to be used like the "fill the gap" features in other toolkits. So for example if you have 4 buttons you can tell FlowLayout to put the first two on the left side going right and then flip over and put the second two on the right side going left. I can't remember the exact property of FlowLayout that sets the "flip index" but hopefully I documented that. Would that cover the use cases you were thinking of?
Carlos wrote: |
Also, would it be possible to extend TableLayout so we could specify exactly in which cell we want each component? |
That's a good idea. Right now you'd have to manipulate the child order. Maybe a better way is to do something like what BorderLayout does and expose a big array of child references that the user fills in. |
|
Back to top |
|
|
Carlos
Joined: 19 Mar 2004 Posts: 396 Location: Canyon, TX
|
Posted: Fri Apr 08, 2005 12:31 pm Post subject: Re: Two suggestions |
|
|
BenHinkle wrote: | One can tell FlowLayout to flip over and start laying out from the other side and I intended that to be used like the "fill the gap" features in other toolkits. So for example if you have 4 buttons you can tell FlowLayout to put the first two on the left side going right and then flip over and put the second two on the right side going left. I can't remember the exact property of FlowLayout that sets the "flip index" but hopefully I documented that. Would that cover the use cases you were thinking of? |
Yes, that'd work. I'm gonna have to check it out.
BenHinkle wrote: | That's a good idea. Right now you'd have to manipulate the child order. Maybe a better way is to do something like what BorderLayout does and expose a big array of child references that the user fills in. |
That's what I had in mind. |
|
Back to top |
|
|
|