#include <QToolTip>
#include <QToolBar>
#include <QApplication>
-#if QT_VERSION < 0x060000
-#include <QDesktopWidget>
-#endif
#include <QPainter>
+#include <QScreen>
#include <QStyle>
#include <QStyleOptionFrame>
#include <QMouseEvent>
}
+#if QT_VERSION < 0x060000
void TearOff::enterEvent(QEvent * event)
+#else
+void TearOff::enterEvent(QEnterEvent * event)
+#endif
{
highlighted_ = true;
update();
: QWidget(parent, Qt::Popup), tornoff_(false)
{
QVBoxLayout * v = new QVBoxLayout(this);
-#if QT_VERSION < 0x060000
- v->setMargin(0);
-#else
v->setContentsMargins(0, 0, 0, 0);
-#endif
v->setSpacing(0);
layout_ = new QGridLayout;
layout_->setSpacing(0);
- const int fw = style()->pixelMetric(QStyle::PM_MenuPanelWidth, 0, this);
#if QT_VERSION < 0x060000
+ const int fw = style()->pixelMetric(QStyle::PM_MenuPanelWidth, 0, this);
layout_->setMargin(fw);
#else
layout_->setContentsMargins(0, 0, 0, 0);
voffset -= parheight;
}
-#if QT_VERSION < 0x060000
- QRect const screen = qApp->desktop()->availableGeometry(this);
-#else
QRect const screen = window()->windowHandle()->screen()->availableGeometry();
-#endif
QPoint const gpos = parentWidget()->mapToGlobal(
parentWidget()->geometry().bottomLeft());