7#include <QtWidgets/qtwidgetsglobal.h>
8#include <QtGui/qwindowdefs.h>
9#include <QtCore/qobject.h>
10#include <QtCore/qmargins.h>
12#include <QtGui/qaction.h>
14#include <QtGui/qpaintdevice.h>
15#include <QtGui/qpalette.h>
16#include <QtGui/qfont.h>
17#include <QtGui/qfontmetrics.h>
18#include <QtGui/qfontinfo.h>
19#include <QtWidgets/qsizepolicy.h>
20#include <QtGui/qregion.h>
21#include <QtGui/qbrush.h>
22#include <QtGui/qcursor.h>
23#if QT_CONFIG(shortcut)
24# include <QtGui/qkeysequence.h>
27#ifdef QT_INCLUDE_COMPAT
28#include <QtGui/qevent.h>
66class QRasterWindowSurface;
67class QUnifiedToolbarSurface;
69#ifndef QT_NO_DEBUG_STREAM
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)
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)
150 Q_PROPERTY(
bool acceptDrops READ acceptDrops WRITE setAcceptDrops)
152 Q_PROPERTY(
QIcon windowIcon READ windowIcon WRITE setWindowIcon NOTIFY windowIconChanged)
153 Q_PROPERTY(
QString windowIconText READ windowIconText WRITE setWindowIconText NOTIFY windowIconTextChanged)
155 Q_PROPERTY(
bool windowModified READ isWindowModified WRITE setWindowModified)
156#if QT_CONFIG(tooltip)
158 Q_PROPERTY(
int toolTipDuration READ toolTipDuration WRITE setToolTipDuration)
160#if QT_CONFIG(statustip)
163#if QT_CONFIG(whatsthis)
166#if QT_CONFIG(accessibility)
168 Q_PROPERTY(
QString accessibleDescription READ accessibleDescription WRITE setAccessibleDescription)
171 QDOC_PROPERTY(Qt::WindowFlags windowFlags READ windowFlags WRITE setWindowFlags)
172 Q_PROPERTY(
bool autoFillBackground READ autoFillBackground WRITE setAutoFillBackground)
173#ifndef QT_NO_STYLE_STYLESHEET
178 Q_PROPERTY(Qt::InputMethodHints inputMethodHints READ inputMethodHints WRITE setInputMethodHints)
183 template <
typename...Args>
184 using compatible_action_slot_args = std::void_t<
186 std::declval<Args>()...))
190 template <
typename...Args>
191 using compatible_action_slot_args = std::enable_if_t<std::conjunction_v<
192#if QT_CONFIG(shortcut)
194 std::is_same<Args, Qt::ConnectionType>,
195 std::negation<std::is_convertible<Args, QKeySequence>>
198 std::negation<std::is_convertible<Args, QIcon>>...,
199 std::negation<std::is_convertible<Args, const char*>>...,
200 std::negation<std::is_convertible<Args, QString>>...
207 DrawWindowBackground = 0x1,
221 WId effectiveWinId()
const;
228#if QT_DEPRECATED_SINCE(6, 1)
230 bool isTopLevel() const;
234 bool isModal()
const;
238 bool isEnabled()
const;
239 bool isEnabledTo(
const QWidget *)
const;
242 void setEnabled(
bool);
243 void setDisabled(
bool);
244 void setWindowModified(
bool);
250 const QRect &geometry()
const;
251 QRect normalGeometry()
const;
258 inline int width()
const;
259 inline int height()
const;
261 QRect childrenRect()
const;
262 QRegion childrenRegion()
const;
264 QSize minimumSize()
const;
265 QSize maximumSize()
const;
266 int minimumWidth()
const;
267 int minimumHeight()
const;
268 int maximumWidth()
const;
269 int maximumHeight()
const;
270 void setMinimumSize(
const QSize &);
271 void setMinimumSize(
int minw,
int minh);
272 void setMaximumSize(
const QSize &);
273 void setMaximumSize(
int maxw,
int maxh);
274 void setMinimumWidth(
int minw);
275 void setMinimumHeight(
int minh);
276 void setMaximumWidth(
int maxw);
277 void setMaximumHeight(
int maxh);
283 QSize sizeIncrement()
const;
284 void setSizeIncrement(
const QSize &);
285 void setSizeIncrement(
int w,
int h);
286 QSize baseSize()
const;
287 void setBaseSize(
const QSize &);
288 void setBaseSize(
int basew,
int baseh);
290 void setFixedSize(
const QSize &);
291 void setFixedSize(
int w,
int h);
292 void setFixedWidth(
int w);
293 void setFixedHeight(
int h);
311 QWidget *nativeParentWidget()
const;
325 void setFont(
const QFont &);
335 void setMouseTracking(
bool enable);
336 bool hasMouseTracking()
const;
337 bool underMouse()
const;
339 void setTabletTracking(
bool enable);
340 bool hasTabletTracking()
const;
349 RenderFlags renderFlags = RenderFlags(DrawWindowBackground | DrawChildren));
353 RenderFlags renderFlags = RenderFlags(DrawWindowBackground | DrawChildren));
357#if QT_CONFIG(graphicseffect)
362#ifndef QT_NO_GESTURES
368 void setWindowTitle(
const QString &);
369#ifndef QT_NO_STYLE_STYLESHEET
373#ifndef QT_NO_STYLE_STYLESHEET
378 QIcon windowIcon()
const;
379 void setWindowIconText(
const QString &);
380 QString windowIconText()
const;
381 void setWindowRole(
const QString &);
383 void setWindowFilePath(
const QString &filePath);
384 QString windowFilePath()
const;
387 qreal windowOpacity()
const;
389 bool isWindowModified()
const;
390#if QT_CONFIG(tooltip)
393 void setToolTipDuration(
int msec);
394 int toolTipDuration()
const;
396#if QT_CONFIG(statustip)
397 void setStatusTip(
const QString &);
400#if QT_CONFIG(whatsthis)
404#if QT_CONFIG(accessibility)
405 QString accessibleName()
const;
407 QString accessibleDescription()
const;
408 void setAccessibleDescription(
const QString &description);
413 void unsetLayoutDirection();
415 void setLocale(
const QLocale &locale);
426 bool isActiveWindow()
const;
427 void activateWindow();
433 bool hasFocus()
const;
444 void grabMouse(
const QCursor &);
448 void releaseKeyboard();
449#ifndef QT_NO_SHORTCUT
451 void releaseShortcut(
int id);
452 void setShortcutEnabled(
int id,
bool enable =
true);
453 void setShortcutAutoRepeat(
int id,
bool enable =
true);
455 static QWidget *mouseGrabber();
456 static QWidget *keyboardGrabber();
459 inline bool updatesEnabled()
const;
462#if QT_CONFIG(graphicsview)
471 inline void update(
int x,
int y,
int w,
int h);
472 void update(
const QRect&);
475 void repaint(
int x,
int y,
int w,
int h);
476 void repaint(
const QRect &);
482 virtual void setVisible(
bool visible);
483 void setHidden(
bool hidden);
487 void showMinimized();
488 void showMaximized();
489 void showFullScreen();
498 void move(
int x,
int y);
499 void move(
const QPoint &);
502 inline void setGeometry(
int x,
int y,
int w,
int h);
503 void setGeometry(
const QRect &);
508 bool isVisibleTo(
const QWidget *)
const;
509 inline bool isHidden()
const;
511 bool isMinimized()
const;
512 bool isMaximized()
const;
513 bool isFullScreen()
const;
515 Qt::WindowStates windowState()
const;
517 void overrideWindowState(Qt::WindowStates
state);
519 virtual QSize sizeHint()
const;
520 virtual QSize minimumSizeHint()
const;
525 virtual int heightForWidth(
int)
const;
526 virtual bool hasHeightForWidth()
const;
531 void setContentsMargins(
const QMargins &margins);
534 QRect contentsRect()
const;
539 void updateGeometry();
544 void scroll(
int dx,
int dy);
545 void scroll(
int dx,
int dy,
const QRect&);
550 QWidget *nextInFocusChain()
const;
551 QWidget *previousInFocusChain()
const;
554 bool acceptDrops()
const;
555 void setAcceptDrops(
bool on);
559 void addAction(
QAction *action);
563 void removeAction(
QAction *action);
573 template <
typename...Args,
typename = compatible_action_slot_args<Args...>>
580 template <
typename...Args,
typename = compatible_action_slot_args<Args...>>
588#if QT_CONFIG(shortcut)
592 const QObject *receiver,
const char *member,
595 const QObject *receiver,
const char *member,
598 template <
typename...Args,
typename = compatible_action_slot_args<Args...>>
605 template <
typename...Args,
typename = compatible_action_slot_args<Args...>>
617 void setWindowFlags(Qt::WindowFlags
type);
618 inline Qt::WindowFlags windowFlags()
const;
620 void overrideWindowFlags(Qt::WindowFlags
type);
625 inline QWidget *childAt(
int x,
int y)
const;
633 void ensurePolished()
const;
637#ifdef QT_KEYPAD_NAVIGATION
638 bool hasEditFocus()
const;
639 void setEditFocus(
bool on);
642 bool autoFillBackground()
const;
643 void setAutoFillBackground(
bool enabled);
666#if QT_CONFIG(wheelevent)
667 virtual void wheelEvent(QWheelEvent *
event);
679#ifndef QT_NO_CONTEXTMENU
682#if QT_CONFIG(tabletevent)
683 virtual void tabletEvent(QTabletEvent *
event);
689#if QT_CONFIG(draganddrop)
690 virtual void dragEnterEvent(QDragEnterEvent *
event);
691 virtual void dragMoveEvent(QDragMoveEvent *
event);
692 virtual void dragLeaveEvent(QDragLeaveEvent *
event);
693 virtual void dropEvent(QDropEvent *
event);
702 virtual void changeEvent(
QEvent *);
713 Qt::InputMethodHints inputMethodHints()
const;
714 void setInputMethodHints(Qt::InputMethodHints hints);
720 void create(WId = 0,
bool initializeWindow =
true,
721 bool destroyOldWindow =
true);
722 void destroy(
bool destroyWindow =
true,
723 bool destroySubWindows =
true);
726 virtual bool focusNextPrevChild(
bool next);
766#ifndef QT_NO_GESTURES
788 if (!
o || !
o->isWidgetType())
return nullptr;
793 if (!
o || !
o->isWidgetType())
return nullptr;
794 return static_cast<const QWidget*
>(
o);
799{
return childAt(
QPoint(ax, ay)); }
804{
return data->window_flags; }
806#if QT_DEPRECATED_SINCE(6, 1)
807inline bool QWidget::isTopLevel()
const
821{
return minimumSize().width(); }
824{
return minimumSize().height(); }
827{
return maximumSize().width(); }
830{
return maximumSize().height(); }
833{ setMinimumSize(
s.width(),
s.height()); }
836{ setMaximumSize(
s.width(),
s.height()); }
839{ setSizeIncrement(
s.width(),
s.height()); }
842{ setBaseSize(
s.width(),
s.height()); }
872{ update(
QRect(ax, ay, aw, ah)); }
887{ setGeometry(
QRect(ax, ay, aw, ah)); }
890{
return QRect(0,0,
data->crect.width(),
data->crect.height()); }
893{
return data->crect; }
896{
return data->crect.size(); }
899{
return data->crect.width(); }
902{
return data->crect.height(); }
930#define QWIDGETSIZE_MAX ((1<<24)-1)
932#ifndef QT_NO_DEBUG_STREAM
The QActionEvent class provides an event that is generated when a QAction is added,...
The QAction class provides an abstraction for user commands that can be added to different user inter...
void triggered(bool checked=false)
This signal is emitted when an action is activated by the user; for example, when the user clicks a m...
The QBackingStore class provides a drawing area for QWindow.
The QCloseEvent class contains parameters that describe a close event.
The QCursor class provides a mouse cursor with an arbitrary shape.
The QFocusEvent class contains event parameters for widget focus events.
\reentrant \inmodule QtGui
The QGraphicsEffect class is the base class for all graphics effects.
The QHideEvent class provides an event which is sent after a widget is hidden.
The QIcon class provides scalable icons in different modes and states.
The QKeyEvent class describes a key event.
The QKeySequence class encapsulates a key sequence as used by shortcuts.
The QLayout class is the base class of geometry managers.
The QMoveEvent class contains event parameters for move events.
QObject * parent() const
Returns a pointer to the parent object.
static QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
\threadsafe
void setParent(QObject *parent)
Makes the object a child of parent.
virtual void initPainter(QPainter *painter) const
virtual int devType() const
virtual QPaintDevice * redirected(QPoint *offset) const
virtual QPainter * sharedPainter() const
virtual int metric(PaintDeviceMetric metric) const
virtual QPaintEngine * paintEngine() const =0
The QPaintEvent class contains event parameters for paint events.
The QPainter class performs low-level painting on widgets and other paint devices.
The QPalette class contains color groups for each widget state.
Returns a copy of the pixmap that is transformed using the given transformation transform and transfo...
\inmodule QtCore\reentrant
\inmodule QtCore\reentrant
\inmodule QtCore\reentrant
The QRegion class specifies a clip region for a painter.
The QResizeEvent class contains event parameters for resize events.
The QScreen class is used to query screen properties. \inmodule QtGui.
The QShowEvent class provides an event that is sent when a widget is shown.
The QSizePolicy class is a layout attribute describing horizontal and vertical resizing policy.
Policy
This enum describes the various per-dimension sizing types used when constructing a QSizePolicy.
\macro QT_RESTRICTED_CAST_FROM_ASCII
The QStyle class is an abstract base class that encapsulates the look and feel of a GUI.
qApp setStyleSheet("QPushButton { color: white }")
[21]
Combined button and popup list for selecting options.
EGLOutputLayerEXT EGLint attribute
#define Q_DECLARE_FLAGS(Flags, Enum)
#define Q_DECLARE_OPERATORS_FOR_FLAGS(Flags)
static void unsetCursor(QWindow *w)
Q_CORE_EXPORT QDebug operator<<(QDebug, const QObject *)
GLint GLint GLint GLint GLint x
[0]
GLenum GLuint GLint level
GLfloat GLfloat GLfloat w
[0]
GLint GLsizei GLsizei height
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLdouble GLdouble GLdouble GLdouble top
GLenum GLenum GLsizei const GLuint GLboolean enabled
GLuint GLsizei const GLchar * message
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLenum GLuint GLintptr offset
GLint GLint GLint GLint GLint GLint GLint GLbitfield mask
GLfloat GLfloat GLfloat GLfloat h
decorationRoleName toolTipRoleName setWhatsThis
decorationRoleName setToolTip
static constexpr QSize frameSize(const T &frame)
static bool isWindow(QObject *object)
#define QT_DEPRECATED_VERSION_X_6_1(text)
static int toInt(const QChar &qc, int R)
static QT_BEGIN_NAMESPACE QString windowTitle(HWND hwnd)
static QRect frameGeometry(HWND hwnd, bool topLevel)
static void setWindowOpacity(HWND hwnd, Qt::WindowFlags flags, bool hasAlpha, bool accelerated, qreal level)
QList< QWidget * > widgets
[11]
QGraphicsOpacityEffect * effect
the effect attached to this item
item setCursor(Qt::IBeamCursor)
[1]
app setAttribute(Qt::AA_DontShowIconsInMenus)
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent