QTabWidget documentMode on mac looks wrong.
I'm trying to use documentMode style tabs on Mac.
Code:
MainWindow::MainWindow()
{
setDocumentMode(true);
tabs->setDocumentMode(true);
QLabel *lbl
= new QLabel(tr
("Titlebar and Tabs are Not Seamless"));
lbl->setAlignment(Qt::AlignCenter);
tabs->addTab(lbl, tr("Hello"));
lbl
= new QLabel(tr
("Bummer"));
lbl->setAlignment(Qt::AlignCenter);
tabs->addTab(lbl, tr("World"));
setCentralWidget(tabs);
setWindowTitle(tr("Test"));
}
Problem is, I'm not getting the smooth look that I'm expecting. Here's how it looks (there is not supposed to be a division between the window's titlebar and the tabs... they are supposed to be seamlessly butted up against eachother).
http://boxybutgood.com/~jeff/QTabWidget.png
This Qt Labs blog post from 2008 shows how it is supposed to look (see the apparently "merged" titlebar and tabs in the window with the foreign text). http://labs.trolltech.com/blogs/2008...abwidget-love/
Does anyone know what I am doing wrong?
I have also tried the following, which do not fix it...
- setUnifiedTitleAndToolBarOnMac(true)
- setMargin(0) on the labels
- using a QFrame instead of a QMainWindow
- pulling my hair out
Thanks for your help!!
Re: QTabWidget documentMode on mac looks wrong.
I think what you get is a correct result. If it wasn't, the tabs on the tabbar would be directed upwards and not downwards. You can see the difference here: http://arorabrowser.blogspot.com/200...r-tab-bar.html