mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-20 10:54:14 +01:00
GCS: This should fix crashing with splitters in Qt 4.7.0 :)
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1749 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
parent
e2dde2c097
commit
c9af2b23d0
@ -46,6 +46,7 @@ public:
|
||||
setMask(QRegion(contentsRect()));
|
||||
setAttribute(Qt::WA_MouseNoMask, true);
|
||||
}
|
||||
void setOrientation(Qt::Orientation orientation);
|
||||
protected:
|
||||
void resizeEvent(QResizeEvent *event);
|
||||
void paintEvent(QPaintEvent *event);
|
||||
@ -59,10 +60,6 @@ using namespace Core::Internal;
|
||||
|
||||
void MiniSplitterHandle::resizeEvent(QResizeEvent *event)
|
||||
{
|
||||
if (orientation() == Qt::Horizontal)
|
||||
setContentsMargins(6, 0, 6, 0);
|
||||
else
|
||||
setContentsMargins(0, 6, 0, 6);
|
||||
setMask(QRegion(contentsRect()));
|
||||
QSplitterHandle::resizeEvent(event);
|
||||
}
|
||||
@ -73,6 +70,16 @@ void MiniSplitterHandle::paintEvent(QPaintEvent *event)
|
||||
painter.fillRect(event->rect(), Utils::StyleHelper::borderColor());
|
||||
}
|
||||
|
||||
|
||||
void MiniSplitterHandle::setOrientation(Qt::Orientation orientation)
|
||||
{
|
||||
QSplitterHandle::setOrientation(orientation);
|
||||
if (orientation == Qt::Horizontal)
|
||||
setContentsMargins(6, 0, 6, 0);
|
||||
else
|
||||
setContentsMargins(0, 6, 0, 6);
|
||||
}
|
||||
|
||||
QSplitterHandle *MiniSplitter::createHandle()
|
||||
{
|
||||
return new MiniSplitterHandle(orientation(), this);
|
||||
|
Loading…
x
Reference in New Issue
Block a user