- Info
| Report type | Suggestion |
Status? | Closed |
Resolution? | Expired |
| Product | Qt |
Functional area | Main Window |
Version found | 4.2.2 |
| Priority? | 2 |
Scheduled for? | Some future release |
Description
It would be nice if there was a way to programmatically decide the position of the tabbar in dock areas. E.g. Left, Right, Top, Bottom etc.
Resolution: In 4.3, you will be able to choose vertical tab bar layout on demand.
This task has been migrated into the public JIRA server as issue QTBUG-402.
http://bugreports.qt.nokia.com/browse/QTBUG-402
History
2007-01-09 00:43 - Entry created
2007-01-11 11:03 - Resolution set to 'Resolved'
2007-01-11 11:03 - Task status changed to 'Closed'
2007-06-14 14:23 - Task status changed to 'Active'
2007-06-14 14:23 - Resolution set to 'Pending'
2007-09-27 16:33 - Version for fix set to 'Some future release'
2007-09-27 16:34 - Task status changed to 'Open'
2007-12-13 13:33 - Task status changed to 'Active'
2008-01-16 10:58 - Task status changed to 'Open'
2009-08-21 22:22 - Priority changed to '2'
2009-10-28 06:35 - Resolution set to 'Expired'
2009-10-28 06:35 - Task status changed to 'Closed'
Comments
Comment from Ralf Wirth
I want to have the tabs in the tabwidget on top, not on the button for
DockWidgets. Can you extend the enum QMainWindow::DockOption by a
value "QMainWindow::TopTabs", please? I it should move all tabs in
docked widgets to the top.
The following code (taken von Qt 4.3) might be patched for that issue:
void QMainWindowLayout::setVerticalTabsEnabled(bool enabled)
{
#ifdef QT_NO_TABBAR
Q_UNUSED(enabled);
#else
QDockAreaLayout &layout = layoutState.dockAreaLayout;
const QTabBar::Shape verticalShapes[] = {
QTabBar::RoundedWest,
QTabBar::RoundedEast,
QTabBar::RoundedNorth,
QTabBar::RoundedSouth
};
for (int i = 0; i < QInternal::DockCount; ++i) {
layout.docks[i].setTabBarShape(
enabled ? verticalShapes[i] : QTabBar::RoundedSouth
);
}
#endif // QT_NO_TABBAR
}
it might become something like:
void QMainWindowLayout::setVerticalTabsEnabled(bool vertical, bool alwaysTop)
{
#ifdef QT_NO_TABBAR
Q_UNUSED(enabled);
#else
QDockAreaLayout &layout = layoutState.dockAreaLayout;
const QTabBar::Shape verticalShapes[] = {
QTabBar::RoundedWest,
QTabBar::RoundedEast,
QTabBar::RoundedNorth,
alwaysTop ? QTabBar::RoundedNorth : QTabBar::RoundedSouth
};
for (int i = 0; i < QInternal::DockCount; ++i) {
layout.docks[i].setTabBarShape(
enabled ?
verticalShapes[i] :
(alwaysTop?QTabBar::RoundedNorth : QTabBar::RoundedSouth)
);
}
#endif // QT_NO_TABBAR
}
---
Comment from Ralf Wirth
I want to have the tabs in the tabwidget on top, not on the button for
DockWidgets. Can you extend the enum QMainWindow::DockOption by a
value "QMainWindow::TopTabs", please? I it should move all tabs in
docked widgets to the top.
The following code (taken von Qt 4.3) might be patched for that issue:
void QMainWindowLayout::setVerticalTabsEnabled(bool enabled)
{
#ifdef QT_NO_TABBAR
Q_UNUSED(enabled);
#else
QDockAreaLayout &layout = layoutState.dockAreaLayout;
const QTabBar::Shape verticalShapes[] = {
QTabBar::RoundedWest,
QTabBar::RoundedEast,
QTabBar::RoundedNorth,
QTabBar::RoundedSouth
};
for (int i = 0; i < QInternal::DockCount; ++i) {
layout.docks[i].setTabBarShape(
enabled ? verticalShapes[i] : QTabBar::RoundedSouth
);
}
#endif // QT_NO_TABBAR
}
it might become something like:
void QMainWindowLayout::setVerticalTabsEnabled(bool vertical, bool alwaysTop)
{
#ifdef QT_NO_TABBAR
Q_UNUSED(enabled);
#else
QDockAreaLayout &layout = layoutState.dockAreaLayout;
const QTabBar::Shape verticalShapes[] = {
QTabBar::RoundedWest,
QTabBar::RoundedEast,
QTabBar::RoundedNorth,
alwaysTop ? QTabBar::RoundedNorth : QTabBar::RoundedSouth
};
for (int i = 0; i < QInternal::DockCount; ++i) {
layout.docks[i].setTabBarShape(
enabled ?
verticalShapes[i] :
(alwaysTop?QTabBar::RoundedNorth : QTabBar::RoundedSouth)
);
}
#endif // QT_NO_TABBAR
}
---
All comments