Hello people,
I'm experiencing some strange behavior with the following set up:
- I'm using QT 4.2.x (Replace .x with the standard Edgy packaged version).
- I create a class which herits from QTabWidget, and dynamicaly creates sub widgets (Tabs).
- I also have created a little other QWidget derived class (With QTDesigner, named CEditorTabButtons) then a subclass which implements it. It is a simple qwidget with inside several QToolButtons. All the QToolsButtons are layed out with a default horizontal boxing.
- In the constructor of the "Tab manager" class, i do:
Qt Code:
pButtonsBar = new CEditorTabButtonsImpl(this); setCornerWidget(pButtonsBar);To copy to clipboard, switch view to plain text mode
Then here comes the strange thing:
If i have only one tab in the tab container, the "corner buttons" are kind of stacked (If i give them a minimal size). They are also resized to very tiny size (If i give them no minimal size). After i add another tab, the buttons have almost their right size, and with more than 2 tabs they have the right size and stop changing size (Until i remove tabs again, they becomes small).
So i tried to tell my CEditorTabButtonsImpl to have a fixed size, the result is that when i only have 1 tab, the box "slides" to the right, and as a result i'm only able to see the 2 first buttons (The others are out of the window).
Resizing the main application window does nothing.
Anyone has a clue on what i'm doing wrong here?
Thanks a lot,
Pierre.
[EDIT:] Just to make thinks a bit more clear: what i'm trying to achieve is a simple tabbed based text editor. So the tools buttons in the tab bar i'm talking about are like such this kind of tool usualy have (With save, open, new close icons). I hope you'll see what i mean
[EDIT2:] Just added 4 screens of what's appening![]()
Bookmarks