98class Q_WIDGETS_EXPORT
QWidget :
public QObject,
public QPaintDevice
101 Q_DECLARE_PRIVATE(QWidget)
103 Q_PROPERTY(
bool modal READ isModal)
104 Q_PROPERTY(Qt::WindowModality windowModality READ windowModality WRITE setWindowModality)
105 Q_PROPERTY(
bool enabled READ isEnabled WRITE setEnabled)
106 Q_PROPERTY(QRect geometry READ geometry WRITE setGeometry)
107 Q_PROPERTY(QRect frameGeometry READ frameGeometry)
108 Q_PROPERTY(QRect normalGeometry READ normalGeometry)
109 Q_PROPERTY(
int x READ x)
110 Q_PROPERTY(
int y READ y)
111 Q_PROPERTY(QPoint pos READ pos WRITE move DESIGNABLE
false STORED
false)
112 Q_PROPERTY(QSize frameSize READ frameSize)
113 Q_PROPERTY(QSize size READ size WRITE resize DESIGNABLE
false STORED
false)
114 Q_PROPERTY(
int width READ width)
115 Q_PROPERTY(
int height READ height)
116 Q_PROPERTY(QRect rect READ rect)
117 Q_PROPERTY(QRect childrenRect READ childrenRect)
118 Q_PROPERTY(QRegion childrenRegion READ childrenRegion)
119 Q_PROPERTY(QSizePolicy sizePolicy READ sizePolicy WRITE setSizePolicy)
120 Q_PROPERTY(QSize minimumSize READ minimumSize WRITE setMinimumSize)
121 Q_PROPERTY(QSize maximumSize READ maximumSize WRITE setMaximumSize)
122 Q_PROPERTY(
int minimumWidth READ minimumWidth WRITE setMinimumWidth STORED
false
124 Q_PROPERTY(
int minimumHeight READ minimumHeight WRITE setMinimumHeight STORED
false
126 Q_PROPERTY(
int maximumWidth READ maximumWidth WRITE setMaximumWidth STORED
false
128 Q_PROPERTY(
int maximumHeight READ maximumHeight WRITE setMaximumHeight STORED
false
130 Q_PROPERTY(QSize sizeIncrement READ sizeIncrement WRITE setSizeIncrement)
131 Q_PROPERTY(QSize baseSize READ baseSize WRITE setBaseSize)
132 Q_PROPERTY(QPalette palette READ palette WRITE setPalette)
133 Q_PROPERTY(QFont font READ font WRITE setFont)
135 Q_PROPERTY(QCursor cursor READ cursor WRITE setCursor RESET unsetCursor)
137 Q_PROPERTY(
bool mouseTracking READ hasMouseTracking WRITE setMouseTracking)
138 Q_PROPERTY(
bool tabletTracking READ hasTabletTracking WRITE setTabletTracking)
139 Q_PROPERTY(
bool isActiveWindow READ isActiveWindow)
140 Q_PROPERTY(Qt::FocusPolicy focusPolicy READ focusPolicy WRITE setFocusPolicy)
141 Q_PROPERTY(
bool focus READ hasFocus)
142 Q_PROPERTY(Qt::ContextMenuPolicy contextMenuPolicy READ contextMenuPolicy WRITE setContextMenuPolicy)
143 Q_PROPERTY(
bool updatesEnabled READ updatesEnabled WRITE setUpdatesEnabled DESIGNABLE
false)
144 Q_PROPERTY(
bool visible READ isVisible WRITE setVisible DESIGNABLE
false)
145 Q_PROPERTY(
bool minimized READ isMinimized)
146 Q_PROPERTY(
bool maximized READ isMaximized)
147 Q_PROPERTY(
bool fullScreen READ isFullScreen)
148 Q_PROPERTY(QSize sizeHint READ sizeHint)
149 Q_PROPERTY(QSize minimumSizeHint READ minimumSizeHint)
150 Q_PROPERTY(
bool acceptDrops READ acceptDrops WRITE setAcceptDrops)
151 Q_PROPERTY(QString windowTitle READ windowTitle WRITE setWindowTitle NOTIFY windowTitleChanged)
152 Q_PROPERTY(QIcon windowIcon READ windowIcon WRITE setWindowIcon NOTIFY windowIconChanged)
153 Q_PROPERTY(QString windowIconText READ windowIconText WRITE setWindowIconText NOTIFY windowIconTextChanged)
154 Q_PROPERTY(
double windowOpacity READ windowOpacity WRITE setWindowOpacity)
155 Q_PROPERTY(
bool windowModified READ isWindowModified WRITE setWindowModified)
156#if QT_CONFIG(tooltip)
157 Q_PROPERTY(QString toolTip READ toolTip WRITE setToolTip)
158 Q_PROPERTY(
int toolTipDuration READ toolTipDuration WRITE setToolTipDuration)
160#if QT_CONFIG(statustip)
161 Q_PROPERTY(QString statusTip READ statusTip WRITE setStatusTip)
163#if QT_CONFIG(whatsthis)
164 Q_PROPERTY(QString whatsThis READ whatsThis WRITE setWhatsThis)
166#if QT_CONFIG(accessibility)
167 Q_PROPERTY(QString accessibleName READ accessibleName WRITE setAccessibleName)
168 Q_PROPERTY(QString accessibleDescription READ accessibleDescription WRITE setAccessibleDescription)
169 Q_PROPERTY(QString accessibleIdentifier READ accessibleIdentifier WRITE setAccessibleIdentifier)
171 Q_PROPERTY(Qt::LayoutDirection layoutDirection READ layoutDirection WRITE setLayoutDirection RESET unsetLayoutDirection)
172 QDOC_PROPERTY(Qt::WindowFlags windowFlags READ windowFlags WRITE setWindowFlags)
173 Q_PROPERTY(
bool autoFillBackground READ autoFillBackground WRITE setAutoFillBackground)
174#ifndef QT_NO_STYLE_STYLESHEET
175 Q_PROPERTY(QString styleSheet READ styleSheet WRITE setStyleSheet)
177 Q_PROPERTY(QLocale locale READ locale WRITE setLocale RESET unsetLocale)
178 Q_PROPERTY(QString windowFilePath READ windowFilePath WRITE setWindowFilePath)
179 Q_PROPERTY(Qt::InputMethodHints inputMethodHints READ inputMethodHints WRITE setInputMethodHints)
184 template <
typename...Args>
185 using compatible_action_slot_args = std::void_t<
186 decltype(QObject::connect(std::declval<QAction*>(), &QAction::triggered,
187 std::declval<Args>()...))
191 template <
typename...Args>
192 using compatible_action_slot_args = std::enable_if_t<std::conjunction_v<
193#if QT_CONFIG(shortcut)
195 std::is_same<Args, Qt::ConnectionType>,
196 std::negation<std::is_convertible<Args, QKeySequence>>
199 std::negation<std::is_convertible<Args, QIcon>>...,
200 std::negation<std::is_convertible<Args,
const char*>>...,
201 std::negation<std::is_convertible<Args, QString>>...
208 DrawWindowBackground = 0x1,
212 Q_DECLARE_FLAGS(RenderFlags, RenderFlag)
214 explicit QWidget(QWidget* parent =
nullptr, Qt::WindowFlags f = Qt::WindowFlags());
217 int devType()
const override;
221 inline WId internalWinId()
const {
return data->winid; }
222 WId effectiveWinId()
const;
225 QStyle *style()
const;
226 void setStyle(QStyle *);
229#if QT_DEPRECATED_SINCE(6
, 1
)
230 QT_DEPRECATED_VERSION_X_6_1(
"Use isWindow()")
231 bool isTopLevel()
const;
233 bool isWindow()
const;
235 bool isModal()
const;
236 Qt::WindowModality windowModality()
const;
237 void setWindowModality(Qt::WindowModality windowModality);
239 bool isEnabled()
const;
240 bool isEnabledTo(
const QWidget *)
const;
243 void setEnabled(
bool);
244 void setDisabled(
bool);
245 void setWindowModified(
bool);
250 QRect frameGeometry()
const;
251 const QRect &geometry()
const;
252 QRect normalGeometry()
const;
257 QSize frameSize()
const;
259 inline int width()
const;
260 inline int height()
const;
261 inline QRect rect()
const;
262 QRect childrenRect()
const;
263 QRegion childrenRegion()
const;
265 QSize minimumSize()
const;
266 QSize maximumSize()
const;
267 int minimumWidth()
const;
268 int minimumHeight()
const;
269 int maximumWidth()
const;
270 int maximumHeight()
const;
271 void setMinimumSize(
const QSize &);
272 void setMinimumSize(
int minw,
int minh);
273 void setMaximumSize(
const QSize &);
274 void setMaximumSize(
int maxw,
int maxh);
275 void setMinimumWidth(
int minw);
276 void setMinimumHeight(
int minh);
277 void setMaximumWidth(
int maxw);
278 void setMaximumHeight(
int maxh);
281 void setupUi(QWidget *widget);
284 QSize sizeIncrement()
const;
285 void setSizeIncrement(
const QSize &);
286 void setSizeIncrement(
int w,
int h);
287 QSize baseSize()
const;
288 void setBaseSize(
const QSize &);
289 void setBaseSize(
int basew,
int baseh);
291 void setFixedSize(
const QSize &);
292 void setFixedSize(
int w,
int h);
293 void setFixedWidth(
int w);
294 void setFixedHeight(
int h);
298 QPointF mapToGlobal(
const QPointF &)
const;
299 QPoint mapToGlobal(
const QPoint &)
const;
300 QPointF mapFromGlobal(
const QPointF &)
const;
301 QPoint mapFromGlobal(
const QPoint &)
const;
302 QPointF mapToParent(
const QPointF &)
const;
303 QPoint mapToParent(
const QPoint &)
const;
304 QPointF mapFromParent(
const QPointF &)
const;
305 QPoint mapFromParent(
const QPoint &)
const;
306 QPointF mapTo(
const QWidget *,
const QPointF &)
const;
307 QPoint mapTo(
const QWidget *,
const QPoint &)
const;
308 QPointF mapFrom(
const QWidget *,
const QPointF &)
const;
309 QPoint mapFrom(
const QWidget *,
const QPoint &)
const;
311 QWidget *window()
const;
312 QWidget *nativeParentWidget()
const;
313 inline QWidget *topLevelWidget()
const {
return window(); }
316 const QPalette &palette()
const;
317 void setPalette(
const QPalette &);
319 void setBackgroundRole(QPalette::ColorRole);
320 QPalette::ColorRole backgroundRole()
const;
322 void setForegroundRole(QPalette::ColorRole);
323 QPalette::ColorRole foregroundRole()
const;
325 const QFont &font()
const;
326 void setFont(
const QFont &);
327 QFontMetrics fontMetrics()
const;
328 QFontInfo fontInfo()
const;
331 QCursor cursor()
const;
332 void setCursor(
const QCursor &);
336 void setMouseTracking(
bool enable);
337 bool hasMouseTracking()
const;
338 bool underMouse()
const;
340 void setTabletTracking(
bool enable);
341 bool hasTabletTracking()
const;
343 void setMask(
const QBitmap &);
344 void setMask(
const QRegion &);
345 QRegion mask()
const;
348 void render(QPaintDevice *target,
const QPoint &targetOffset = QPoint(),
349 const QRegion &sourceRegion = QRegion(),
350 RenderFlags renderFlags = RenderFlags(DrawWindowBackground | DrawChildren));
352 void render(QPainter *painter,
const QPoint &targetOffset = QPoint(),
353 const QRegion &sourceRegion = QRegion(),
354 RenderFlags renderFlags = RenderFlags(DrawWindowBackground | DrawChildren));
356 Q_INVOKABLE QPixmap grab(
const QRect &rectangle = QRect(QPoint(0, 0), QSize(-1, -1)));
358#if QT_CONFIG(graphicseffect)
359 QGraphicsEffect *graphicsEffect()
const;
360 void setGraphicsEffect(QGraphicsEffect *effect);
363#ifndef QT_NO_GESTURES
364 void grabGesture(Qt::GestureType type, Qt::GestureFlags flags = Qt::GestureFlags());
365 void ungrabGesture(Qt::GestureType type);
369 void setWindowTitle(
const QString &);
370#ifndef QT_NO_STYLE_STYLESHEET
371 void setStyleSheet(
const QString& styleSheet);
374#ifndef QT_NO_STYLE_STYLESHEET
375 QString styleSheet()
const;
377 QString windowTitle()
const;
378 void setWindowIcon(
const QIcon &icon);
379 QIcon windowIcon()
const;
380 void setWindowIconText(
const QString &);
381 QString windowIconText()
const;
382 void setWindowRole(
const QString &);
383 QString windowRole()
const;
384 void setWindowFilePath(
const QString &filePath);
385 QString windowFilePath()
const;
387 void setWindowOpacity(qreal level);
388 qreal windowOpacity()
const;
390 bool isWindowModified()
const;
391#if QT_CONFIG(tooltip)
392 void setToolTip(
const QString &);
393 QString toolTip()
const;
394 void setToolTipDuration(
int msec);
395 int toolTipDuration()
const;
397#if QT_CONFIG(statustip)
398 void setStatusTip(
const QString &);
399 QString statusTip()
const;
401#if QT_CONFIG(whatsthis)
402 void setWhatsThis(
const QString &);
403 QString whatsThis()
const;
405#if QT_CONFIG(accessibility)
406 QString accessibleName()
const;
407 void setAccessibleName(
const QString &name);
408 QString accessibleDescription()
const;
409 void setAccessibleDescription(
const QString &description);
410 QString accessibleIdentifier()
const;
411 void setAccessibleIdentifier(
const QString &identifier);
414 void setLayoutDirection(Qt::LayoutDirection direction);
415 Qt::LayoutDirection layoutDirection()
const;
416 void unsetLayoutDirection();
418 void setLocale(
const QLocale &locale);
419 QLocale locale()
const;
422 inline bool isRightToLeft()
const {
return layoutDirection() == Qt::RightToLeft; }
423 inline bool isLeftToRight()
const {
return layoutDirection() == Qt::LeftToRight; }
426 inline void setFocus() { setFocus(Qt::OtherFocusReason); }
429 bool isActiveWindow()
const;
430 void activateWindow();
433 void setFocus(Qt::FocusReason reason);
434 Qt::FocusPolicy focusPolicy()
const;
435 void setFocusPolicy(Qt::FocusPolicy policy);
436 bool hasFocus()
const;
437 static void setTabOrder(QWidget *, QWidget *);
438 static void setTabOrder(std::initializer_list<QWidget *> widgets);
439 void setFocusProxy(QWidget *);
440 QWidget *focusProxy()
const;
441 Qt::ContextMenuPolicy contextMenuPolicy()
const;
442 void setContextMenuPolicy(Qt::ContextMenuPolicy policy);
447 void grabMouse(
const QCursor &);
451 void releaseKeyboard();
452#ifndef QT_NO_SHORTCUT
453 int grabShortcut(
const QKeySequence &key, Qt::ShortcutContext context = Qt::WindowShortcut);
454 void releaseShortcut(
int id);
455 void setShortcutEnabled(
int id,
bool enable =
true);
456 void setShortcutAutoRepeat(
int id,
bool enable =
true);
458 static QWidget *mouseGrabber();
459 static QWidget *keyboardGrabber();
462 inline bool updatesEnabled()
const;
463 void setUpdatesEnabled(
bool enable);
465#if QT_CONFIG(graphicsview)
466 QGraphicsProxyWidget *graphicsProxyWidget()
const;
474 inline void update(
int x,
int y,
int w,
int h);
475 void update(
const QRect&);
476 void update(
const QRegion&);
478 void repaint(
int x,
int y,
int w,
int h);
479 void repaint(
const QRect &);
480 void repaint(
const QRegion &);
485 virtual void setVisible(
bool visible);
486 void setHidden(
bool hidden);
490 void showMinimized();
491 void showMaximized();
492 void showFullScreen();
500 void stackUnder(QWidget*);
501 void move(
int x,
int y);
502 void move(
const QPoint &);
503 void resize(
int w,
int h);
504 void resize(
const QSize &);
505 inline void setGeometry(
int x,
int y,
int w,
int h);
506 void setGeometry(
const QRect &);
507 QByteArray saveGeometry()
const;
508 bool restoreGeometry(
const QByteArray &geometry);
510 bool isVisible()
const;
511 bool isVisibleTo(
const QWidget *)
const;
512 inline bool isHidden()
const;
514 bool isMinimized()
const;
515 bool isMaximized()
const;
516 bool isFullScreen()
const;
518 Qt::WindowStates windowState()
const;
519 void setWindowState(Qt::WindowStates state);
520 void overrideWindowState(Qt::WindowStates state);
522 virtual QSize sizeHint()
const;
523 virtual QSize minimumSizeHint()
const;
525 QSizePolicy sizePolicy()
const;
526 void setSizePolicy(QSizePolicy);
527 inline void setSizePolicy(QSizePolicy::Policy horizontal, QSizePolicy::Policy vertical);
528 virtual int heightForWidth(
int)
const;
529 virtual bool hasHeightForWidth()
const;
531 QRegion visibleRegion()
const;
533 void setContentsMargins(
int left,
int top,
int right,
int bottom);
534 void setContentsMargins(
const QMargins &margins);
535 QMargins contentsMargins()
const;
537 QRect contentsRect()
const;
540 QLayout *layout()
const;
541 void setLayout(QLayout *);
542 void updateGeometry();
544 void setParent(QWidget *parent);
545 void setParent(QWidget *parent, Qt::WindowFlags f);
547 void scroll(
int dx,
int dy);
548 void scroll(
int dx,
int dy,
const QRect&);
552 QWidget *focusWidget()
const;
553 QWidget *nextInFocusChain()
const;
554 QWidget *previousInFocusChain()
const;
557 bool acceptDrops()
const;
558 void setAcceptDrops(
bool on);
562 void addAction(QAction *action);
563 void addActions(
const QList<QAction*> &actions);
564 void insertActions(QAction *before,
const QList<QAction*> &actions);
565 void insertAction(QAction *before, QAction *action);
566 void removeAction(QAction *action);
567 QList<QAction*> actions()
const;
570 QAction *addAction(
const QString &text);
571 QAction *addAction(
const QIcon &icon,
const QString &text);
572 QAction *addAction(
const QString &text,
const QObject *receiver,
573 const char *member, Qt::ConnectionType type = Qt::AutoConnection);
574 QAction *addAction(
const QIcon &icon,
const QString &text,
const QObject *receiver,
575 const char *member, Qt::ConnectionType type = Qt::AutoConnection);
576 template <
typename...Args,
typename = compatible_action_slot_args<Args...>>
577 QAction *addAction(
const QString &text, Args&&...args)
579 QAction *result = addAction(text);
580 connect(result, &QAction::triggered, std::forward<Args>(args)...);
583 template <
typename...Args,
typename = compatible_action_slot_args<Args...>>
584 QAction *addAction(
const QIcon &icon,
const QString &text, Args&&...args)
586 QAction *result = addAction(icon, text);
587 connect(result, &QAction::triggered, std::forward<Args>(args)...);
591#if QT_CONFIG(shortcut)
592 QAction *addAction(
const QString &text,
const QKeySequence &shortcut);
593 QAction *addAction(
const QIcon &icon,
const QString &text,
const QKeySequence &shortcut);
594 QAction *addAction(
const QString &text,
const QKeySequence &shortcut,
595 const QObject *receiver,
const char *member,
596 Qt::ConnectionType type = Qt::AutoConnection);
597 QAction *addAction(
const QIcon &icon,
const QString &text,
const QKeySequence &shortcut,
598 const QObject *receiver,
const char *member,
599 Qt::ConnectionType type = Qt::AutoConnection);
601 template <
typename...Args,
typename = compatible_action_slot_args<Args...>>
602 QAction *addAction(
const QString &text,
const QKeySequence &shortcut, Args&&...args)
604 QAction *result = addAction(text, shortcut);
605 connect(result, &QAction::triggered, std::forward<Args>(args)...);
608 template <
typename...Args,
typename = compatible_action_slot_args<Args...>>
609 QAction *addAction(
const QIcon &icon,
const QString &text,
const QKeySequence &shortcut, Args&&...args)
611 QAction *result = addAction(icon, text, shortcut);
612 connect(result, &QAction::triggered, std::forward<Args>(args)...);
618 QWidget *parentWidget()
const;
620 void setWindowFlags(Qt::WindowFlags type);
621 inline Qt::WindowFlags windowFlags()
const;
622 void setWindowFlag(Qt::WindowType,
bool on =
true);
623 void overrideWindowFlags(Qt::WindowFlags type);
625 inline Qt::WindowType windowType()
const;
627 static QWidget *find(WId);
628 inline QWidget *childAt(
int x,
int y)
const;
629 QWidget *childAt(
const QPoint &p)
const;
630 QWidget *childAt(
const QPointF &p)
const;
632 void setAttribute(Qt::WidgetAttribute,
bool on =
true);
633 inline bool testAttribute(Qt::WidgetAttribute)
const;
635 QPaintEngine *paintEngine()
const override;
637 void ensurePolished()
const;
639 bool isAncestorOf(
const QWidget *child)
const;
641#ifdef QT_KEYPAD_NAVIGATION
642 bool hasEditFocus()
const;
643 void setEditFocus(
bool on);
646 bool autoFillBackground()
const;
647 void setAutoFillBackground(
bool enabled);
649 QBackingStore *backingStore()
const;
651 QWindow *windowHandle()
const;
652 QScreen *screen()
const;
653 void setScreen(QScreen *);
655 static QWidget *createWindowContainer(QWindow *window, QWidget *parent=
nullptr, Qt::WindowFlags flags=Qt::WindowFlags());
658 void windowTitleChanged(
const QString &title);
659 void windowIconChanged(
const QIcon &icon);
660 void windowIconTextChanged(
const QString &iconText);
661 void customContextMenuRequested(
const QPoint &pos);
665 bool event(QEvent *event) override;
666 virtual void mousePressEvent(QMouseEvent *event);
667 virtual void mouseReleaseEvent(QMouseEvent *event);
668 virtual void mouseDoubleClickEvent(QMouseEvent *event);
669 virtual void mouseMoveEvent(QMouseEvent *event);
670#if QT_CONFIG(wheelevent)
671 virtual void wheelEvent(QWheelEvent *event);
673 virtual void keyPressEvent(QKeyEvent *event);
674 virtual void keyReleaseEvent(QKeyEvent *event);
675 virtual void focusInEvent(QFocusEvent *event);
676 virtual void focusOutEvent(QFocusEvent *event);
677 virtual void enterEvent(QEnterEvent *event);
678 virtual void leaveEvent(QEvent *event);
679 virtual void paintEvent(QPaintEvent *event);
680 virtual void moveEvent(QMoveEvent *event);
681 virtual void resizeEvent(QResizeEvent *event);
682 virtual void closeEvent(QCloseEvent *event);
683#ifndef QT_NO_CONTEXTMENU
684 virtual void contextMenuEvent(QContextMenuEvent *event);
686#if QT_CONFIG(tabletevent)
687 virtual void tabletEvent(QTabletEvent *event);
690 virtual void actionEvent(QActionEvent *event);
693#if QT_CONFIG(draganddrop)
694 virtual void dragEnterEvent(QDragEnterEvent *event);
695 virtual void dragMoveEvent(QDragMoveEvent *event);
696 virtual void dragLeaveEvent(QDragLeaveEvent *event);
697 virtual void dropEvent(QDropEvent *event);
700 virtual void showEvent(QShowEvent *event);
701 virtual void hideEvent(QHideEvent *event);
703 virtual bool nativeEvent(
const QByteArray &eventType,
void *message, qintptr *result);
706 virtual void changeEvent(QEvent *);
708 int metric(PaintDeviceMetric)
const override;
709 void initPainter(QPainter *painter)
const override;
710 QPaintDevice *redirected(QPoint *offset)
const override;
711 QPainter *sharedPainter()
const override;
713 virtual void inputMethodEvent(QInputMethodEvent *);
715 virtual QVariant inputMethodQuery(Qt::InputMethodQuery)
const;
717 Qt::InputMethodHints inputMethodHints()
const;
718 void setInputMethodHints(Qt::InputMethodHints hints);
721 void updateMicroFocus(Qt::InputMethodQuery query = Qt::ImQueryAll);
724 void create(WId = 0,
bool initializeWindow =
true,
725 bool destroyOldWindow =
true);
726 void destroy(
bool destroyWindow =
true,
727 bool destroySubWindows =
true);
729 friend class QDataWidgetMapperPrivate;
730 virtual bool focusNextPrevChild(
bool next);
731 inline bool focusNextChild() {
return focusNextPrevChild(
true); }
732 inline bool focusPreviousChild() {
return focusNextPrevChild(
false); }
735 QWidget(QWidgetPrivate &d, QWidget* parent, Qt::WindowFlags f);
737 void setBackingStore(QBackingStore *store);
739 bool testAttribute_helper(Qt::WidgetAttribute)
const;
741 QLayout *takeLayout();
743 friend class QBackingStoreDevice;
744 friend class QWidgetRepaintManager;
745 friend class QApplication;
746 friend class QApplicationPrivate;
747 friend class QGuiApplication;
748 friend class QGuiApplicationPrivate;
749 friend class QBaseApplication;
750 friend class QPainter;
751 friend class QPainterPrivate;
752 friend class QPixmap;
753 friend class QFontMetrics;
754 friend class QFontInfo;
755 friend class QLayout;
756 friend class QWidgetItem;
757 friend class QWidgetItemV2;
758 friend class QX11PaintEngine;
759 friend class QWin32PaintEngine;
760 friend class QShortcutPrivate;
761 friend class QWindowSurface;
762 friend class QGraphicsProxyWidget;
763 friend class QGraphicsProxyWidgetPrivate;
764 friend class QStyleSheetStyle;
765 friend struct QWidgetExceptionCleaner;
766 friend class QWidgetWindow;
767 friend class QAccessibleWidget;
768 friend class QAccessibleTable;
769 friend class QAccessibleTabButton;
770#ifndef QT_NO_GESTURES
771 friend class QGestureManager;
772 friend class QWinNativePanGestureRecognizer;
774 friend class QWidgetEffectSourcePrivate;
776 friend Q_WIDGETS_EXPORT QWidgetData *qt_qwidget_data(QWidget *widget);
777 friend Q_WIDGETS_EXPORT QWidgetPrivate *qt_widget_private(QWidget *widget);
780 Q_DISABLE_COPY(QWidget)
781 Q_PRIVATE_SLOT(d_func(),
void _q_showIfNotHidden())
782 Q_PRIVATE_SLOT(d_func(), QWindow *_q_closestWindowHandle())