-
1 Attachment(s)
QToolBox Formatting
Hi folks,
Here's a basic QToolBox:
http://www.qtcentre.org/forum/attach...1&d=1136664547
How do I bring down the spacing between the tabs to zero? For example the gap between ToolBox Item 1 and ToolBox Item 2
I know this is basic, but I can't find it!
Ta,
C.
-
Re: QToolBox Formatting
I think this depends on the style. You'll have to alter the style. Did you tried other styles?
-
2 Attachment(s)
Re: QToolBox Formatting
Thanks Axel,
When I use the '-style plastique' flag it does produce that nicer "tab" style tab:
http://www.qtcentre.org/forum/attach...1&d=1136724318
But what I had in mind was something more like:
http://www.qtcentre.org/forum/attach...1&d=1136724418
Not so much the colours and shading style, but the inter-tab spacing. Any ideas?
Thanks
Chris
-
Re: QToolBox Formatting
Use a proxystyle to replace the code for handling the toolbox with your own code. Proxystyle is explained here:
http://doc.trolltech.com/qq/qq09-q-and-a.html#style
-
Re: QToolBox Formatting
Thanks Axel, so it's not quite as trivial as I'd hoped...:eek:
-
Re: QToolBox Formatting
Oh, the (in)famous "outlook nav bar issue" again :D
We found it easier to implement such a widget using a set of buttons (or frames), splitter and a stacked widget instead of a QToolBox. The buttons just cause the stacked widget page to change.
-
1 Attachment(s)
Re: QToolBox Formatting
Hi again
Boredom and foolishness led me to try re-implementing QToolBox, to see if I could make something with easier access to it's layout. By some miraculous good fortune it worked, check out the pic:
Attachment 20
If anyone wants the source I'll put it up here later.
Thanks!
Chris
-
Re: QToolBox Formatting
Of course we are interested in the source.
-
1 Attachment(s)
Re: QToolBox Formatting
Here it is,
In summary:
I've put the QToolBoxButton into a seperate ToolBoxButton class, and moved all the internal QToolBoxPrivate stuff into the ToolBox class where I could get at it's bits. Then it was just a case of putting a
Code:
layout->setSpacing(0);
in the constructor.
Cheers!
Chris
Attachment 21