Clean up layouts and use minisplitter everywhere

This patch replaces all uses of QSplitter with thin 1-pixel
splitters. I also fixed dock widget layouts in main windows
to do the same. Additionally I had to tweak the tabbars so
they look good in mini splitter layouts to avoid a double
left-border.

Reviewed-by: thorbjorn
This commit is contained in:
Jens Bache-Wiig
2010-03-16 16:55:56 +01:00
parent 0146926f19
commit d58184173e
13 changed files with 52 additions and 6 deletions

View File

@@ -35,6 +35,7 @@
#include <QtGui/QVBoxLayout>
#include <QtGui/QDockWidget>
#include <QtGui/QAbstractItemView>
using namespace Designer::Constants;
@@ -59,6 +60,13 @@ EditorWidget::EditorWidget(FormEditorW *few, QWidget *parent) :
QWidget *subWindow = subs[i];
subWindow->setWindowTitle(subs[i]->windowTitle());
m_designerDockWidgets[i] = addDockForWidget(subWindow);
// Since we have 1-pixel splitters, we generally want to remove
// frames around item views. So we apply this hack for now.
QList<QAbstractItemView*> frames = subWindow->findChildren<QAbstractItemView*>();
for (int i = 0 ; i< frames.count(); ++i)
frames[i]->setFrameStyle(QFrame::NoFrame);
}
resetToDefaultLayout();
}