Add locator input widget to help windows

And move the "Show Sidebar" button into the status bar that we
need now anyhow.

Change-Id: I24bfa0991cbdcdba4d1a8cd6cbacde28d459972d
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Eike Ziller
2017-07-03 16:26:26 +02:00
parent acc86aee5a
commit c363c1d4ee
10 changed files with 85 additions and 54 deletions

View File

@@ -100,3 +100,33 @@ MiniSplitter::MiniSplitter(Qt::Orientation orientation, SplitterStyle style)
setChildrenCollapsible(false);
setProperty("minisplitter", true);
}
/*!
\class NonResizingSplitter
\inmodule Qt Creator
The NonResizingSplitter class is a MiniSplitter that keeps its first widget's size fixed
when it is resized.
*/
/*!
Constructs a non-resizing splitter with \a parent and \a style.
The default style is MiniSplitter::Light.
*/
NonResizingSplitter::NonResizingSplitter(QWidget *parent, SplitterStyle style)
: MiniSplitter(parent, style)
{
}
/*!
\internal
*/
void NonResizingSplitter::resizeEvent(QResizeEvent *ev)
{
// bypass QSplitter magic
int leftSplitWidth = qMin(sizes().at(0), ev->size().width());
int rightSplitWidth = qMax(0, ev->size().width() - leftSplitWidth);
setSizes(QList<int>() << leftSplitWidth << rightSplitWidth);
QWidget::resizeEvent(ev);
}