void QDockWidgetPrivate::unplug(const QRect &rect) { Q_Q(QDockWidget); QRect r = rect; r.moveTopLeft(q->mapToGlobal(QPoint(0, 0))); QDockWidgetLayout *dwLayout = qobject_cast<QDockWidgetLayout*>(layout); if (dwLayout->nativeWindowDeco(true)) r.adjust(0, dwLayout->titleHeight(), 0, 0); setWindowState(true, true, r); }
void QDockWidgetPrivate::unplug(const QRect &rect) { Q_Q(QDockWidget); QRect r = rect; r.moveTopLeft(q->mapToGlobal(QPoint(0, 0))); #ifndef Q_WS_X11 QDockWidgetLayout *layout = qobject_cast<QDockWidgetLayout*>(q->layout()); r.adjust(0, layout->titleHeight(), 0, 0); #endif setWindowState(true, true, r); }