Qt 4.8
|
The QWidget class is the base class of all user interface objects. More...
#include <qwidget.h>
Public Types | |
enum | RenderFlag { DrawWindowBackground = 0x1, DrawChildren = 0x2, IgnoreMask = 0x4 } |
This enum describes how to render the widget when calling QWidget::render(). More... | |
Public Types inherited from QPaintDevice | |
enum | PaintDeviceMetric { PdmWidth = 1, PdmHeight, PdmWidthMM, PdmHeightMM, PdmNumColors, PdmDepth, PdmDpiX, PdmDpiY, PdmPhysicalDpiX, PdmPhysicalDpiY } |
Public Slots | |
bool | close () |
Closes this widget. More... | |
void | hide () |
Hides the widget. More... | |
void | lower () |
Lowers the widget to the bottom of the parent widget's stack. More... | |
void | raise () |
Raises this widget to the top of the parent widget's stack. More... | |
void | repaint () |
Repaints the widget directly by calling paintEvent() immediately, unless updates are disabled or the widget is hidden. More... | |
void | setDisabled (bool) |
Disables widget input events if disable is true; otherwise enables input events. More... | |
void | setEnabled (bool) |
void | setFocus () |
Gives the keyboard input focus to this widget (or its focus proxy) if this widget or one of its parents is the active window. More... | |
void | setHidden (bool hidden) |
Convenience function, equivalent to setVisible(!hidden). More... | |
QT_MOC_COMPAT void | setShown (bool shown) |
Use setVisible(shown) instead. More... | |
void | setStyleSheet (const QString &styleSheet) |
virtual void | setVisible (bool visible) |
void | setWindowModified (bool) |
void | setWindowTitle (const QString &) |
void | show () |
Shows the widget and its child widgets. More... | |
void | showFullScreen () |
Shows the widget in full-screen mode. More... | |
void | showMaximized () |
Shows the widget maximized. More... | |
void | showMinimized () |
Shows the widget minimized, as an icon. More... | |
void | showNormal () |
Restores the widget after it has been maximized or minimized. More... | |
void | update () |
Updates the widget unless updates are disabled or the widget is hidden. More... | |
Public Slots inherited from QObject | |
void | deleteLater () |
Schedules this object for deletion. More... | |
Signals | |
void | customContextMenuRequested (const QPoint &pos) |
This signal is emitted when the widget's contextMenuPolicy is Qt::CustomContextMenu, and the user has requested a context menu on the widget. More... | |
Signals inherited from QObject | |
void | destroyed (QObject *=0) |
This signal is emitted immediately before the object obj is destroyed, and can not be blocked. More... | |
Public Functions | |
bool | acceptDrops () const |
QString | accessibleDescription () const |
QString | accessibleName () const |
QList< QAction * > | actions () const |
Returns the (possibly empty) list of this widget's actions. More... | |
void | activateWindow () |
Sets the top-level widget containing this widget to be the active window. More... | |
void | addAction (QAction *action) |
Appends the action action to this widget's list of actions. More... | |
void | addActions (QList< QAction *> actions) |
Appends the actions actions to this widget's list of actions. More... | |
void | adjustSize () |
Adjusts the size of the widget to fit its contents. More... | |
bool | autoFillBackground () const |
QPalette::ColorRole | backgroundRole () const |
Returns the background role of the widget. More... | |
QSize | baseSize () const |
QWidget * | childAt (int x, int y) const |
Returns the visible child widget at the position ({x}, {y}) in the widget's coordinate system. More... | |
QWidget * | childAt (const QPoint &p) const |
Returns the visible child widget at point p in the widget's own coordinate system. More... | |
QRect | childrenRect () const |
QRegion | childrenRegion () const |
void | clearFocus () |
Takes keyboard input focus from the widget. More... | |
void | clearMask () |
Removes any mask set by setMask(). More... | |
QMargins | contentsMargins () const |
The contentsMargins function returns the widget's contents margins. More... | |
QRect | contentsRect () const |
Returns the area inside the widget's margins. More... | |
Qt::ContextMenuPolicy | contextMenuPolicy () const |
void | createWinId () |
QCursor | cursor () const |
int | devType () const |
WId | effectiveWinId () const |
Returns the effective window system identifier of the widget, i. More... | |
void | ensurePolished () const |
Ensures that the widget has been polished by QStyle (i.e., has a proper font and palette). More... | |
Qt::FocusPolicy | focusPolicy () const |
QWidget * | focusProxy () const |
Returns the focus proxy, or 0 if there is no focus proxy. More... | |
QWidget * | focusWidget () const |
Returns the last child of this widget that setFocus had been called on. More... | |
const QFont & | font () const |
QFontInfo | fontInfo () const |
Returns the font info for the widget's current font. More... | |
QFontMetrics | fontMetrics () const |
Returns the font metrics for the widget's current font. More... | |
QPalette::ColorRole | foregroundRole () const |
Returns the foreground role. More... | |
QRect | frameGeometry () const |
QSize | frameSize () const |
const QRect & | geometry () const |
void | getContentsMargins (int *left, int *top, int *right, int *bottom) const |
Returns the widget's contents margins for left, top, right, and bottom. More... | |
HDC | getDC () const |
Returns the window system handle of the widget, for low-level access. More... | |
void | grabGesture (Qt::GestureType type, Qt::GestureFlags flags=Qt::GestureFlags()) |
Subscribes the widget to a given gesture with specific flags. More... | |
void | grabKeyboard () |
Grabs the keyboard input. More... | |
void | grabMouse () |
Grabs the mouse input. More... | |
void | grabMouse (const QCursor &) |
int | grabShortcut (const QKeySequence &key, Qt::ShortcutContext context=Qt::WindowShortcut) |
Adds a shortcut to Qt's shortcut system that watches for the given key sequence in the given context. More... | |
QGraphicsEffect * | graphicsEffect () const |
The graphicsEffect function returns a pointer to the widget's graphics effect. More... | |
QGraphicsProxyWidget * | graphicsProxyWidget () const |
Returns the proxy widget for the corresponding embedded widget in a graphics view; otherwise returns 0. More... | |
bool | hasFocus () const |
bool | hasMouseTracking () const |
int | height () const |
virtual int | heightForWidth (int) const |
Returns the preferred height for this widget, given the width w. More... | |
QInputContext * | inputContext () |
This function returns the QInputContext for this widget. More... | |
Qt::InputMethodHints | inputMethodHints () const |
virtual QVariant | inputMethodQuery (Qt::InputMethodQuery) const |
This method is only relevant for input widgets. More... | |
void | insertAction (QAction *before, QAction *action) |
Inserts the action action to this widget's list of actions, before the action before. More... | |
void | insertActions (QAction *before, QList< QAction *> actions) |
Inserts the actions actions to this widget's list of actions, before the action before. More... | |
WId | internalWinId () const |
Returns the window system identifier of the widget, or 0 if the widget is not created yet. More... | |
bool | isActiveWindow () const |
bool | isAncestorOf (const QWidget *child) const |
Returns true if this widget is a parent, (or grandparent and so on to any level), of the given child, and both widgets are within the same window; otherwise returns false. More... | |
bool | isEnabled () const |
bool | isEnabledTo (QWidget *) const |
Returns true if this widget would become enabled if ancestor is enabled; otherwise returns false. More... | |
bool | isEnabledToTLW () const |
This function is deprecated. More... | |
bool | isFullScreen () const |
bool | isHidden () const |
Returns true if the widget is hidden, otherwise returns false. More... | |
bool | isLeftToRight () const |
bool | isMaximized () const |
bool | isMinimized () const |
bool | isModal () const |
bool | isRightToLeft () const |
bool | isTopLevel () const |
Use isWindow() instead. More... | |
bool | isVisible () const |
bool | isVisibleTo (QWidget *) const |
Returns true if this widget would become visible if ancestor is shown; otherwise returns false. More... | |
bool | isWindow () const |
Returns true if the widget is an independent window, otherwise returns false. More... | |
bool | isWindowModified () const |
QLayout * | layout () const |
Returns the layout manager that is installed on this widget, or 0 if no layout manager is installed. More... | |
Qt::LayoutDirection | layoutDirection () const |
QLocale | locale () const |
Qt::HANDLE | macCGHandle () const |
Returns the CoreGraphics handle of the widget. More... | |
Qt::HANDLE | macQDHandle () const |
Returns the QuickDraw handle of the widget. More... | |
QPoint | mapFrom (QWidget *, const QPoint &) const |
Translates the widget coordinate pos from the coordinate system of parent to this widget's coordinate system. More... | |
QPoint | mapFromGlobal (const QPoint &) const |
Translates the global screen coordinate pos to widget coordinates. More... | |
QPoint | mapFromParent (const QPoint &) const |
Translates the parent widget coordinate pos to widget coordinates. More... | |
QPoint | mapTo (QWidget *, const QPoint &) const |
Translates the widget coordinate pos to the coordinate system of parent. More... | |
QPoint | mapToGlobal (const QPoint &) const |
Translates the widget coordinate pos to global screen coordinates. More... | |
QPoint | mapToParent (const QPoint &) const |
Translates the widget coordinate pos to a coordinate in the parent widget. More... | |
QRegion | mask () const |
Returns the mask currently set on a widget. More... | |
int | maximumHeight () const |
QSize | maximumSize () const |
int | maximumWidth () const |
int | minimumHeight () const |
QSize | minimumSize () const |
virtual QSize | minimumSizeHint () const |
int | minimumWidth () const |
void | move (int x, int y) |
This corresponds to move(QPoint(x, y)). More... | |
void | move (const QPoint &) |
QWidget * | nativeParentWidget () const |
Returns the native parent for this widget, i. More... | |
QWidget * | nextInFocusChain () const |
Returns the next widget in this widget's focus chain. More... | |
QRect | normalGeometry () const |
void | overrideWindowFlags (Qt::WindowFlags type) |
Sets the window flags for the widget to flags, without telling the window system. More... | |
void | overrideWindowState (Qt::WindowStates state) |
QPaintEngine * | paintEngine () const |
Returns the widget's paint engine. More... | |
const QPalette & | palette () const |
QWidget * | parentWidget () const |
Returns the parent of this widget, or 0 if it does not have any parent widget. More... | |
QPoint | pos () const |
QWidget * | previousInFocusChain () const |
The previousInFocusChain function returns the previous widget in this widget's focus chain. More... | |
QWidget (QWidget *parent=0, Qt::WindowFlags f=0) | |
Constructs a widget which is a child of parent, with widget flags set to f. More... | |
QRect | rect () const |
void | releaseDC (HDC) const |
Releases the HDC hdc acquired by a previous call to getDC(). More... | |
void | releaseKeyboard () |
Releases the keyboard grab. More... | |
void | releaseMouse () |
Releases the mouse grab. More... | |
void | releaseShortcut (int id) |
Removes the shortcut with the given id from Qt's shortcut system. More... | |
void | removeAction (QAction *action) |
Removes the action action from this widget's list of actions. More... | |
void | render (QPaintDevice *target, const QPoint &targetOffset=QPoint(), const QRegion &sourceRegion=QRegion(), RenderFlags renderFlags=RenderFlags(DrawWindowBackground|DrawChildren)) |
Renders the sourceRegion of this widget into the target using renderFlags to determine how to render. More... | |
void | render (QPainter *painter, const QPoint &targetOffset=QPoint(), const QRegion &sourceRegion=QRegion(), RenderFlags renderFlags=RenderFlags(DrawWindowBackground|DrawChildren)) |
Renders the widget into the painter's QPainter::device(). More... | |
void | repaint (int x, int y, int w, int h) |
This version repaints a rectangle (x, y, w, h) inside the widget. More... | |
void | repaint (const QRect &) |
This version repaints a rectangle rect inside the widget. More... | |
void | repaint (const QRegion &) |
This version repaints a region rgn inside the widget. More... | |
void | resize (int w, int h) |
This corresponds to resize(QSize(w, h)). More... | |
void | resize (const QSize &) |
bool | restoreGeometry (const QByteArray &geometry) |
Restores the geometry and state top-level widgets stored in the byte array geometry. More... | |
QByteArray | saveGeometry () const |
Saves the current geometry and state for top-level widgets. More... | |
void | scroll (int dx, int dy) |
Scrolls the widget including its children dx pixels to the right and dy downward. More... | |
void | scroll (int dx, int dy, const QRect &) |
This version only scrolls r and does not move the children of the widget. More... | |
void | setAcceptDrops (bool on) |
void | setAccessibleDescription (const QString &description) |
void | setAccessibleName (const QString &name) |
void | setAttribute (Qt::WidgetAttribute, bool on=true) |
Sets the attribute attribute on this widget if on is true; otherwise clears the attribute. More... | |
void | setAutoFillBackground (bool enabled) |
void | setBackgroundRole (QPalette::ColorRole) |
Sets the background role of the widget to role. More... | |
void | setBaseSize (const QSize &) |
void | setBaseSize (int basew, int baseh) |
This corresponds to setBaseSize(QSize(basew, baseh)). More... | |
void | setContentsMargins (int left, int top, int right, int bottom) |
Sets the margins around the contents of the widget to have the sizes left, top, right, and bottom. More... | |
void | setContentsMargins (const QMargins &margins) |
The setContentsMargins function sets the margins around the widget's contents. More... | |
void | setContextMenuPolicy (Qt::ContextMenuPolicy policy) |
void | setCursor (const QCursor &) |
void | setFixedHeight (int h) |
Sets both the minimum and maximum heights of the widget to h without changing the widths. More... | |
void | setFixedSize (const QSize &) |
Sets both the minimum and maximum sizes of the widget to s, thereby preventing it from ever growing or shrinking. More... | |
void | setFixedSize (int w, int h) |
Sets the width of the widget to w and the height to h. More... | |
void | setFixedWidth (int w) |
Sets both the minimum and maximum width of the widget to w without changing the heights. More... | |
void | setFocus (Qt::FocusReason reason) |
Gives the keyboard input focus to this widget (or its focus proxy) if this widget or one of its parents is the active window. More... | |
void | setFocusPolicy (Qt::FocusPolicy policy) |
void | setFocusProxy (QWidget *) |
Sets the widget's focus proxy to widget w. More... | |
void | setFont (const QFont &) |
Use the single-argument overload instead. More... | |
void | setForegroundRole (QPalette::ColorRole) |
Sets the foreground role of the widget to role. More... | |
void | setGeometry (int x, int y, int w, int h) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.This corresponds to setGeometry(QRect(x, y, w, h)). More... | |
void | setGeometry (const QRect &) |
void | setGraphicsEffect (QGraphicsEffect *effect) |
The setGraphicsEffect function is for setting the widget's graphics effect. More... | |
void | setInputContext (QInputContext *) |
This function sets the input context context on this widget. More... | |
void | setInputMethodHints (Qt::InputMethodHints hints) |
void | setLayout (QLayout *) |
Sets the layout manager for this widget to layout. More... | |
void | setLayoutDirection (Qt::LayoutDirection direction) |
void | setLocale (const QLocale &locale) |
void | setMask (const QBitmap &) |
Causes only the pixels of the widget for which bitmap has a corresponding 1 bit to be visible. More... | |
void | setMask (const QRegion &) |
Causes only the parts of the widget which overlap region to be visible. More... | |
void | setMaximumHeight (int maxh) |
void | setMaximumSize (const QSize &) |
void | setMaximumSize (int maxw, int maxh) |
This function corresponds to setMaximumSize(QSize(maxw, maxh)). More... | |
void | setMaximumWidth (int maxw) |
void | setMinimumHeight (int minh) |
void | setMinimumSize (const QSize &) |
void | setMinimumSize (int minw, int minh) |
This function corresponds to setMinimumSize(QSize(minw, minh)). More... | |
void | setMinimumWidth (int minw) |
void | setMouseTracking (bool enable) |
void | setPalette (const QPalette &) |
Use the single-argument overload instead. More... | |
void | setParent (QWidget *parent) |
Sets the parent of the widget to parent, and resets the window flags. More... | |
void | setParent (QWidget *parent, Qt::WindowFlags f) |
This function also takes widget flags, f as an argument. More... | |
void | setShortcutAutoRepeat (int id, bool enable=true) |
If enable is true, auto repeat of the shortcut with the given id is enabled; otherwise it is disabled. More... | |
void | setShortcutEnabled (int id, bool enable=true) |
If enable is true, the shortcut with the given id is enabled; otherwise the shortcut is disabled. More... | |
void | setSizeIncrement (const QSize &) |
void | setSizeIncrement (int w, int h) |
Sets the x (width) size increment to w and the y (height) size increment to h. More... | |
void | setSizePolicy (QSizePolicy) |
void | setSizePolicy (QSizePolicy::Policy horizontal, QSizePolicy::Policy vertical) |
Sets the size policy of the widget to horizontal and vertical, with standard stretch and no height-for-width. More... | |
void | setStatusTip (const QString &) |
void | setStyle (QStyle *) |
Sets the widget's GUI style to style. More... | |
void | setToolTip (const QString &) |
void | setUpdatesEnabled (bool enable) |
void | setupUi (QWidget *widget) |
Sets up the user interface for the specified widget. More... | |
void | setWhatsThis (const QString &) |
void | setWindowFilePath (const QString &filePath) |
void | setWindowFlags (Qt::WindowFlags type) |
void | setWindowIcon (const QIcon &icon) |
void | setWindowIconText (const QString &) |
void | setWindowModality (Qt::WindowModality windowModality) |
void | setWindowOpacity (qreal level) |
void | setWindowRole (const QString &) |
Sets the window's role to role. More... | |
void | setWindowState (Qt::WindowStates state) |
Sets the window state to windowState. More... | |
void | setWindowSurface (QWindowSurface *surface) |
Sets the window surface to be the surface specified. More... | |
QSize | size () const |
virtual QSize | sizeHint () const |
QSize | sizeIncrement () const |
QSizePolicy | sizePolicy () const |
void | stackUnder (QWidget *) |
Places the widget under w in the parent widget's stack. More... | |
QString | statusTip () const |
QStyle * | style () const |
QString | styleSheet () const |
bool | testAttribute (Qt::WidgetAttribute) const |
Returns true if attribute attribute is set on this widget; otherwise returns false. More... | |
QString | toolTip () const |
QWidget * | topLevelWidget () const |
bool | underMouse () const |
Returns true if the widget is under the mouse cursor; otherwise returns false. More... | |
void | ungrabGesture (Qt::GestureType type) |
Unsubscribes the widget from a given gesture type. More... | |
void | unsetCursor () |
void | unsetLayoutDirection () |
void | unsetLocale () |
void | update (int x, int y, int w, int h) |
This version updates a rectangle (x, y, w, h) inside the widget. More... | |
void | update (const QRect &) |
This version updates a rectangle rect inside the widget. More... | |
void | update (const QRegion &) |
This version repaints a region rgn inside the widget. More... | |
void | updateGeometry () |
Notifies the layout system that this widget has changed and may need to change geometry. More... | |
bool | updatesEnabled () const |
QRegion | visibleRegion () const |
Returns the unobscured region where paint events can occur. More... | |
QString | whatsThis () const |
int | width () const |
QWidget * | window () const |
Returns the window for this widget, i.e. More... | |
QString | windowFilePath () const |
Qt::WindowFlags | windowFlags () const |
Window flags are a combination of a type (e. More... | |
QIcon | windowIcon () const |
QString | windowIconText () const |
Qt::WindowModality | windowModality () const |
qreal | windowOpacity () const |
QString | windowRole () const |
Returns the window's role, or an empty string. More... | |
Qt::WindowStates | windowState () const |
Returns the current window state. More... | |
QWindowSurface * | windowSurface () const |
Returns the QWindowSurface this widget will be drawn into. More... | |
QString | windowTitle () const |
Qt::WindowType | windowType () const |
Returns the window type of this widget. More... | |
WId | winId () const |
Returns the window system identifier of the widget. More... | |
int | x () const |
const QX11Info & | x11Info () const |
Returns information about the configuration of the X display used to display the widget. More... | |
Qt::HANDLE | x11PictureHandle () const |
Returns the X11 Picture handle of the widget for XRender support. More... | |
int | y () const |
~QWidget () | |
Destroys the widget. More... | |
Public Functions inherited from QObject | |
bool | blockSignals (bool b) |
If block is true, signals emitted by this object are blocked (i.e., emitting a signal will not invoke anything connected to it). More... | |
const QObjectList & | children () const |
Returns a list of child objects. More... | |
bool | connect (const QObject *sender, const char *signal, const char *member, Qt::ConnectionType type=Qt::AutoConnection) const |
bool | disconnect (const char *signal=0, const QObject *receiver=0, const char *member=0) |
bool | disconnect (const QObject *receiver, const char *member=0) |
void | dumpObjectInfo () |
Dumps information about signal connections, etc. More... | |
void | dumpObjectTree () |
Dumps a tree of children to the debug output. More... | |
QList< QByteArray > | dynamicPropertyNames () const |
Returns the names of all properties that were dynamically added to the object using setProperty(). More... | |
virtual bool | eventFilter (QObject *, QEvent *) |
Filters events if this object has been installed as an event filter for the watched object. More... | |
template<typename T > | |
T | findChild (const QString &aName=QString()) const |
Returns the child of this object that can be cast into type T and that is called name, or 0 if there is no such object. More... | |
template<typename T > | |
QList< T > | findChildren (const QString &aName=QString()) const |
Returns all children of this object with the given name that can be cast to type T, or an empty list if there are no such objects. More... | |
template<typename T > | |
QList< T > | findChildren (const QRegExp &re) const |
bool | inherits (const char *classname) const |
Returns true if this object is an instance of a class that inherits className or a QObject subclass that inherits className; otherwise returns false. More... | |
void | installEventFilter (QObject *) |
Installs an event filter filterObj on this object. More... | |
bool | isWidgetType () const |
Returns true if the object is a widget; otherwise returns false. More... | |
void | killTimer (int id) |
Kills the timer with timer identifier, id. More... | |
virtual const QMetaObject * | metaObject () const |
Returns a pointer to the meta-object of this object. More... | |
void | moveToThread (QThread *thread) |
Changes the thread affinity for this object and its children. More... | |
QString | objectName () const |
QObject * | parent () const |
Returns a pointer to the parent object. More... | |
QVariant | property (const char *name) const |
Returns the value of the object's name property. More... | |
Q_INVOKABLE | QObject (QObject *parent=0) |
Constructs an object with parent object parent. More... | |
void | removeEventFilter (QObject *) |
Removes an event filter object obj from this object. More... | |
void | setObjectName (const QString &name) |
void | setParent (QObject *) |
Makes the object a child of parent. More... | |
bool | setProperty (const char *name, const QVariant &value) |
Sets the value of the object's name property to value. More... | |
void | setUserData (uint id, QObjectUserData *data) |
bool | signalsBlocked () const |
Returns true if signals are blocked; otherwise returns false. More... | |
int | startTimer (int interval) |
Starts a timer and returns a timer identifier, or returns zero if it could not start a timer. More... | |
QThread * | thread () const |
Returns the thread in which the object lives. More... | |
QObjectUserData * | userData (uint id) const |
virtual | ~QObject () |
Destroys the object, deleting all its child objects. More... | |
Public Functions inherited from QPaintDevice | |
int | colorCount () const |
int | depth () const |
int | height () const |
int | heightMM () const |
int | logicalDpiX () const |
int | logicalDpiY () const |
QT_DEPRECATED int | numColors () const |
bool | paintingActive () const |
int | physicalDpiX () const |
int | physicalDpiY () const |
int | width () const |
int | widthMM () const |
virtual | ~QPaintDevice () |
Static Public Functions | |
static QWidget * | find (WId) |
Returns a pointer to the widget with window identifer/handle id. More... | |
static QWidget * | keyboardGrabber () |
Returns the widget that is currently grabbing the keyboard input. More... | |
static QWidget * | mouseGrabber () |
Returns the widget that is currently grabbing the mouse input. More... | |
static void | setTabOrder (QWidget *, QWidget *) |
Puts the second widget after the first widget in the focus order. More... | |
Static Public Functions inherited from QObject | |
static bool | connect (const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection) |
Creates a connection of the given type from the signal in the sender object to the method in the receiver object. More... | |
static bool | connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type=Qt::AutoConnection) |
static bool | disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *member) |
Disconnects signal in object sender from method in object receiver. More... | |
static bool | disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &member) |
static uint | registerUserData () |
static QString | tr (const char *sourceText, const char *comment=0, int n=-1) |
static QString | trUtf8 (const char *sourceText, const char *comment=0, int n=-1) |
Static Public Functions inherited from QPaintDevice | |
static QWSDisplay * | qwsDisplay () |
Protected Slots | |
void | updateMicroFocus () |
Updates the widget's micro focus. More... | |
Protected Functions | |
virtual void | actionEvent (QActionEvent *) |
This event handler is called with the given event whenever the widget's actions are changed. More... | |
virtual void | changeEvent (QEvent *) |
This event handler can be reimplemented to handle state changes. More... | |
virtual void | closeEvent (QCloseEvent *) |
This event handler is called with the given event when Qt receives a window close request for a top-level widget from the window system. More... | |
virtual void | contextMenuEvent (QContextMenuEvent *) |
This event handler, for event event, can be reimplemented in a subclass to receive widget context menu events. More... | |
void | create (WId=0, bool initializeWindow=true, bool destroyOldWindow=true) |
Creates a new widget window if window is 0, otherwise sets the widget's window to window. More... | |
void | destroy (bool destroyWindow=true, bool destroySubWindows=true) |
Frees up window system resources. More... | |
virtual void | dragEnterEvent (QDragEnterEvent *) |
This event handler is called when a drag is in progress and the mouse enters this widget. More... | |
virtual void | dragLeaveEvent (QDragLeaveEvent *) |
This event handler is called when a drag is in progress and the mouse leaves this widget. More... | |
virtual void | dragMoveEvent (QDragMoveEvent *) |
This event handler is called if a drag is in progress, and when any of the following conditions occur: the cursor enters this widget, the cursor moves within this widget, or a modifier key is pressed on the keyboard while this widget has the focus. More... | |
virtual void | dropEvent (QDropEvent *) |
This event handler is called when the drag is dropped on this widget. More... | |
virtual void | enabledChange (bool) |
virtual void | enterEvent (QEvent *) |
This event handler can be reimplemented in a subclass to receive widget enter events which are passed in the event parameter. More... | |
bool | event (QEvent *) |
This is the main event handler; it handles event event. More... | |
virtual void | focusInEvent (QFocusEvent *) |
This event handler can be reimplemented in a subclass to receive keyboard focus events (focus received) for the widget. More... | |
bool | focusNextChild () |
Finds a new widget to give the keyboard focus to, as appropriate for Tab, and returns true if it can find a new widget, or false if it can't. More... | |
virtual bool | focusNextPrevChild (bool next) |
Finds a new widget to give the keyboard focus to, as appropriate for Tab and Shift+Tab, and returns true if it can find a new widget, or false if it can't. More... | |
virtual void | focusOutEvent (QFocusEvent *) |
This event handler can be reimplemented in a subclass to receive keyboard focus events (focus lost) for the widget. More... | |
bool | focusPreviousChild () |
Finds a new widget to give the keyboard focus to, as appropriate for Shift+Tab, and returns true if it can find a new widget, or false if it can't. More... | |
virtual void | fontChange (const QFont &) |
virtual void | hideEvent (QHideEvent *) |
This event handler can be reimplemented in a subclass to receive widget hide events. More... | |
virtual void | inputMethodEvent (QInputMethodEvent *) |
This event handler, for event event, can be reimplemented in a subclass to receive Input Method composition events. More... | |
virtual void | keyPressEvent (QKeyEvent *) |
This event handler, for event event, can be reimplemented in a subclass to receive key press events for the widget. More... | |
virtual void | keyReleaseEvent (QKeyEvent *) |
This event handler, for event event, can be reimplemented in a subclass to receive key release events for the widget. More... | |
virtual void | languageChange () |
virtual void | leaveEvent (QEvent *) |
This event handler can be reimplemented in a subclass to receive widget leave events which are passed in the event parameter. More... | |
virtual bool | macEvent (EventHandlerCallRef, EventRef) |
This special event handler can be reimplemented in a subclass to receive native Macintosh events. More... | |
int | metric (PaintDeviceMetric) const |
Internal implementation of the virtual QPaintDevice::metric() function. More... | |
virtual void | mouseDoubleClickEvent (QMouseEvent *) |
This event handler, for event event, can be reimplemented in a subclass to receive mouse double click events for the widget. More... | |
virtual void | mouseMoveEvent (QMouseEvent *) |
This event handler, for event event, can be reimplemented in a subclass to receive mouse move events for the widget. More... | |
virtual void | mousePressEvent (QMouseEvent *) |
This event handler, for event event, can be reimplemented in a subclass to receive mouse press events for the widget. More... | |
virtual void | mouseReleaseEvent (QMouseEvent *) |
This event handler, for event event, can be reimplemented in a subclass to receive mouse release events for the widget. More... | |
virtual void | moveEvent (QMoveEvent *) |
This event handler can be reimplemented in a subclass to receive widget move events which are passed in the event parameter. More... | |
virtual void | paintEvent (QPaintEvent *) |
This event handler can be reimplemented in a subclass to receive paint events passed in event. More... | |
virtual void | paletteChange (const QPalette &) |
QWidget (QWidgetPrivate &d, QWidget *parent, Qt::WindowFlags f) | |
virtual bool | qwsEvent (QWSEvent *) |
This special event handler can be reimplemented in a subclass to receive native Qt for Embedded Linux events which are passed in the event parameter. More... | |
void | resetInputContext () |
This function can be called on the widget that currently has focus to reset the input method operating on it. More... | |
virtual void | resizeEvent (QResizeEvent *) |
This event handler can be reimplemented in a subclass to receive widget resize events which are passed in the event parameter. More... | |
virtual void | showEvent (QShowEvent *) |
This event handler can be reimplemented in a subclass to receive widget show events which are passed in the event parameter. More... | |
virtual void | styleChange (QStyle &) |
virtual void | tabletEvent (QTabletEvent *) |
This event handler, for event event, can be reimplemented in a subclass to receive tablet events for the widget. More... | |
virtual void | wheelEvent (QWheelEvent *) |
This event handler, for event event, can be reimplemented in a subclass to receive wheel events for the widget. More... | |
virtual void | windowActivationChange (bool) |
virtual bool | winEvent (MSG *message, long *result) |
This special event handler can be reimplemented in a subclass to receive native Windows events which are passed in the message parameter. More... | |
virtual bool | x11Event (XEvent *) |
This special event handler can be reimplemented in a subclass to receive native X11 events passed in the event parameter. More... | |
Protected Functions inherited from QObject | |
virtual void | childEvent (QChildEvent *) |
This event handler can be reimplemented in a subclass to receive child events. More... | |
virtual void | connectNotify (const char *signal) |
This virtual function is called when something has been connected to signal in this object. More... | |
virtual void | customEvent (QEvent *) |
This event handler can be reimplemented in a subclass to receive custom events. More... | |
virtual void | disconnectNotify (const char *signal) |
This virtual function is called when something has been disconnected from signal in this object. More... | |
QObject (QObjectPrivate &dd, QObject *parent=0) | |
int | receivers (const char *signal) const |
Returns the number of receivers connected to the signal. More... | |
QObject * | sender () const |
Returns a pointer to the object that sent the signal, if called in a slot activated by a signal; otherwise it returns 0. More... | |
int | senderSignalIndex () const |
virtual void | timerEvent (QTimerEvent *) |
This event handler can be reimplemented in a subclass to receive timer events for the object. More... | |
Protected Functions inherited from QPaintDevice | |
QPaintDevice () | |
Private Functions | |
QLayout * | takeLayout () |
Remove the layout from the widget. More... | |
bool | testAttribute_helper (Qt::WidgetAttribute) const |
Properties | |
bool | acceptDrops |
whether drop events are enabled for this widget More... | |
QString | accessibleDescription |
the widget's description as seen by assistive technologies More... | |
QString | accessibleName |
the widget's name as seen by assistive technologies More... | |
bool | autoFillBackground |
whether the widget background is filled automatically More... | |
QSize | baseSize |
the base size of the widget More... | |
QRect | childrenRect |
the bounding rectangle of the widget's children More... | |
QRegion | childrenRegion |
the combined region occupied by the widget's children More... | |
Qt::ContextMenuPolicy | contextMenuPolicy |
how the widget shows a context menu More... | |
QCursor | cursor |
the cursor shape for this widget More... | |
QWidgetData * | data |
bool | enabled |
whether the widget is enabled More... | |
bool | focus |
whether this widget (or its focus proxy) has the keyboard input focus More... | |
Qt::FocusPolicy | focusPolicy |
the way the widget accepts keyboard focus More... | |
QFont | font |
the font currently set for the widget More... | |
QRect | frameGeometry |
geometry of the widget relative to its parent including any window frame More... | |
QSize | frameSize |
the size of the widget including any window frame More... | |
bool | fullScreen |
whether the widget is shown in full screen mode More... | |
QRect | geometry |
the geometry of the widget relative to its parent and excluding the window frame More... | |
int | height |
the height of the widget excluding any window frame More... | |
Qt::InputMethodHints | inputMethodHints |
What input method specific hints the widget has. More... | |
bool | isActiveWindow |
whether this widget's window is the active window More... | |
Qt::LayoutDirection | layoutDirection |
the layout direction for this widget More... | |
QLocale | locale |
the widget's locale More... | |
bool | maximized |
whether this widget is maximized More... | |
int | maximumHeight |
the widget's maximum height in pixels More... | |
QSize | maximumSize |
the widget's maximum size in pixels More... | |
int | maximumWidth |
the widget's maximum width in pixels More... | |
bool | minimized |
whether this widget is minimized (iconified) More... | |
int | minimumHeight |
the widget's minimum height in pixels More... | |
QSize | minimumSize |
the widget's minimum size More... | |
QSize | minimumSizeHint |
the recommended minimum size for the widget More... | |
int | minimumWidth |
the widget's minimum width in pixels More... | |
bool | modal |
whether the widget is a modal widget More... | |
bool | mouseTracking |
whether mouse tracking is enabled for the widget More... | |
QRect | normalGeometry |
the geometry of the widget as it will appear when shown as a normal (not maximized or full screen) top-level widget More... | |
QPalette | palette |
the widget's palette More... | |
QPoint | pos |
the position of the widget within its parent widget More... | |
QRect | rect |
the internal geometry of the widget excluding any window frame More... | |
QSize | size |
the size of the widget excluding any window frame More... | |
QSize | sizeHint |
the recommended size for the widget More... | |
QSize | sizeIncrement |
the size increment of the widget More... | |
QSizePolicy | sizePolicy |
the default layout behavior of the widget More... | |
QString | statusTip |
the widget's status tip More... | |
QString | styleSheet |
the widget's style sheet More... | |
QString | toolTip |
the widget's tooltip More... | |
bool | updatesEnabled |
whether updates are enabled More... | |
bool | visible |
whether the widget is visible More... | |
QString | whatsThis |
the widget's What's This help text. More... | |
int | width |
the width of the widget excluding any window frame More... | |
QString | windowFilePath |
the file path associated with a widget More... | |
QIcon | windowIcon |
the widget's icon More... | |
QString | windowIconText |
the widget's icon text More... | |
Qt::WindowModality | windowModality |
which windows are blocked by the modal widget More... | |
bool | windowModified |
whether the document shown in the window has unsaved changes More... | |
double | windowOpacity |
The level of opacity for the window. More... | |
QString | windowTitle |
the window title (caption) More... | |
int | x |
the x coordinate of the widget relative to its parent including any window frame More... | |
int | y |
the y coordinate of the widget relative to its parent and including any window frame More... | |
Related Functions | |
(Note that these are not member functions.) | |
QWidgetList | |
WId | |
Platform dependent window identifier. More... | |
Related Functions inherited from QObject | |
T | qFindChildqFindChildren (const QObject *obj, const QString &name)() |
QList< T > | qFindChildrenqFindChildren (const QObject *obj, const QString &name)() |
QList< T > | qFindChildrenqFindChildren (const QObject *obj, const QRegExp ®Exp)() |
T * | qobject_cast (QObject *object) |
QObjectList | |
void * | qt_find_obj_child (QObject *parent, const char *type, const QString &name) |
Returns a pointer to the object named name that inherits type and with a given parent. More... | |
Related Functions inherited from QPaintDevice | |
const Q_GUI_EXPORT QX11Info * | qt_x11Info (const QPaintDevice *pd) |
Returns the QX11Info structure for the pd paint device. More... | |
Additional Inherited Members | |
Static Public Variables inherited from QObject | |
static const QMetaObject | staticMetaObject |
This variable stores the meta-object for the class. More... | |
Protected Variables inherited from QObject | |
QScopedPointer< QObjectData > | d_ptr |
Protected Variables inherited from QPaintDevice | |
ushort | painters |
Static Protected Variables inherited from QObject | |
static const QMetaObject | staticQtMetaObject |
The QWidget class is the base class of all user interface objects.
The widget is the atom of the user interface: it receives mouse, keyboard and other events from the window system, and paints a representation of itself on the screen. Every widget is rectangular, and they are sorted in a Z-order. A widget is clipped by its parent and by the widgets in front of it.
A widget that is not embedded in a parent widget is called a window. Usually, windows have a frame and a title bar, although it is also possible to create windows without such decoration using suitable window flags). In Qt, QMainWindow and the various subclasses of QDialog are the most common window types.
Every widget's constructor accepts one or two standard arguments:
QWidget *parent = 0
is the parent of the new widget. If it is 0 (the default), the new widget will be a window. If not, it will be a child of parent, and be constrained by parent's geometry (unless you specify Qt::Window as window flag). Qt::WindowFlags f = 0
(where available) sets the window flags; the default is suitable for almost all widgets, but to get, for example, a window without a window system frame, you must use special flags. QWidget has many member functions, but some of them have little direct functionality; for example, QWidget has a font property, but never uses this itself. There are many subclasses which provide real functionality, such as QLabel, QPushButton, QListWidget, and QTabWidget.
A widget without a parent widget is always an independent window (top-level widget). For these widgets, setWindowTitle() and setWindowIcon() set the title bar and icon respectively.
Non-window widgets are child widgets, displayed within their parent widgets. Most widgets in Qt are mainly useful as child widgets. For example, it is possible to display a button as a top-level window, but most people prefer to put their buttons inside other widgets, such as QDialog.
The diagram above shows a QGroupBox widget being used to hold various child widgets in a layout provided by QGridLayout. The QLabel child widgets have been outlined to indicate their full sizes.
If you want to use a QWidget to hold child widgets you will usually want to add a layout to the parent QWidget. See Layout Management for more information.
When a widget is used as a container to group a number of child widgets, it is known as a composite widget. These can be created by constructing a widget with the required visual properties - a QFrame, for example - and adding child widgets to it, usually managed by a layout. The above diagram shows such a composite widget that was created using Qt Designer.
Composite widgets can also be created by subclassing a standard widget, such as QWidget or QFrame, and adding the necessary layout and child widgets in the constructor of the subclass. Many of the Qt Examples {examples provided with Qt} use this approach, and it is also covered in the Qt Tutorials.
Since QWidget is a subclass of QPaintDevice, subclasses can be used to display custom content that is composed using a series of painting operations with an instance of the QPainter class. This approach contrasts with the canvas-style approach used by the Graphics View {Graphics View Framework} where items are added to a scene by the application and are rendered by the framework itself.
Each widget performs all painting operations from within its paintEvent() function. This is called whenever the widget needs to be redrawn, either as a result of some external change or when requested by the application.
The Analog Clock example shows how a simple widget can handle paint events.
When implementing a new widget, it is almost always useful to reimplement sizeHint() to provide a reasonable default size for the widget and to set the correct size policy with setSizePolicy().
By default, composite widgets which do not provide a size hint will be sized according to the space requirements of their child widgets.
The size policy lets you supply good default behavior for the layout management system, so that other widgets can contain and manage yours easily. The default size policy indicates that the size hint represents the preferred size of the widget, and this is often good enough for many widgets.
Widgets respond to events that are typically caused by user actions. Qt delivers events to widgets by calling specific event handler functions with instances of QEvent subclasses containing information about each event.
If your widget only contains child widgets, you probably do not need to implement any event handlers. If you want to detect a mouse click in a child widget call the child's underMouse() function inside the widget's mousePressEvent().
The Scribble example implements a wider set of events to handle mouse movement, button presses, and window resizing.
You will need to supply the behavior and content for your own widgets, but here is a brief overview of the events that are relevant to QWidget, starting with the most common ones:
Widgets that accept keyboard input need to reimplement a few more event handlers:
You may be required to also reimplement some of the less common event handlers:
There are also some rather obscure events described in the documentation for QEvent::Type. To handle these events, you need to reimplement event() directly.
The default implementation of event() handles Tab and Shift+Tab (to move the keyboard focus), and passes on most of the other events to one of the more specialized handlers above.
Events and the mechanism used to deliver them are covered in The Event System.
In addition to the standard widget styles for each platform, widgets can also be styled according to rules specified in a style sheet. This feature enables you to customize the appearance of specific widgets to provide visual cues to users about their purpose. For example, a button could be styled in a particular way to indicate that it performs a destructive action.
The use of widget style sheets is described in more detail in the Qt Style Sheets document.
Since Qt 4.0, QWidget automatically double-buffers its painting, so there is no need to write double-buffering code in paintEvent() to avoid flicker.
Since Qt 4.1, the Qt::WA_ContentsPropagated widget attribute has been deprecated. Instead, the contents of parent widgets are propagated by default to each of their children as long as Qt::WA_PaintOnScreen is not set. Custom widgets can be written to take advantage of this feature by updating irregular regions (to create non-rectangular child widgets), or painting with colors that have less than full alpha component. The following diagram shows how attributes and properties of a custom widget can be fine-tuned to achieve different effects.
In the above diagram, a semi-transparent rectangular child widget with an area removed is constructed and added to a parent widget (a QLabel showing a pixmap). Then, different properties and widget attributes are set to achieve different effects:
To rapidly update custom widgets with simple background colors, such as real-time plotting or graphing widgets, it is better to define a suitable background color (using setBackgroundRole() with the QPalette::Window role), set the autoFillBackground property, and only implement the necessary drawing functionality in the widget's paintEvent().
To rapidly update custom widgets that constantly paint over their entire areas with opaque content, e.g., video streaming widgets, it is better to set the widget's Qt::WA_OpaquePaintEvent, avoiding any unnecessary overhead associated with repainting the widget's background.
If a widget has both the Qt::WA_OpaquePaintEvent widget attribute and the autoFillBackground property set, the Qt::WA_OpaquePaintEvent attribute takes precedence. Depending on your requirements, you should choose either one of them.
Since Qt 4.1, the contents of parent widgets are also propagated to standard Qt widgets. This can lead to some unexpected results if the parent widget is decorated in a non-standard way, as shown in the diagram below.
The scope for customizing the painting behavior of standard Qt widgets, without resorting to subclassing, is slightly less than that possible for custom widgets. Usually, the desired appearance of a standard widget can be achieved by setting its autoFillBackground property.
Since Qt 4.5, it has been possible to create windows with translucent regions on window systems that support compositing.
To enable this feature in a top-level widget, set its Qt::WA_TranslucentBackground attribute with setAttribute() and ensure that its background is painted with non-opaque colors in the regions you want to be partially transparent.
Platform notes:
Introduced in Qt 4.4, alien widgets are widgets unknown to the windowing system. They do not have a native window handle associated with them. This feature significantly speeds up widget painting, resizing, and removes flicker.
Should you require the old behavior with native windows, you can choose one of the following options:
QT_USE_NATIVE_WINDOWS=1
in your environment. Since Qt 4.6, Softkeys are usually physical keys on a device that have a corresponding label or other visual representation on the screen that is generally located next to its physical counterpart. They are most often found on mobile phone platforms. In modern touch based user interfaces it is also possible to have softkeys that do not correspond to any physical keys. Softkeys differ from other onscreen labels in that they are contextual.
In Qt, contextual softkeys are added to a widget by calling addAction() and passing a QAction
with a softkey role set on it. When the widget containing the softkey actions has focus, its softkeys should appear in the user interface. Softkeys are discovered by traversing the widget hierarchy so it is possible to define a single set of softkeys that are present at all times by calling addAction() for a given top level widget.
On some platforms, this concept overlaps with QMenuBar
such that if no other softkeys are found and the top level widget is a QMainWindow containing a QMenuBar, the menubar actions may appear on one of the softkeys.
Note: Currently softkeys are only supported on the Symbian Platform.
enum QWidget::RenderFlag |
This enum describes how to render the widget when calling QWidget::render().
Enumerator | |
---|---|
DrawWindowBackground | |
DrawChildren | |
IgnoreMask |
|
explicit |
Constructs a widget which is a child of parent, with widget flags set to f.
If parent is 0, the new widget becomes a window. If parent is another widget, this widget becomes a child window inside parent. The new widget is deleted when its parent is deleted.
The widget flags argument, f, is normally 0, but it can be set to customize the frame of a window (i.e. parent must be 0). To customize the frame, use a value composed from the bitwise OR of any of the window flags.
If you add a child widget to an already visible widget you must explicitly show the child to make it visible.
Note that the X11 version of Qt may not be able to deliver all combinations of style flags on all systems. This is because on X11, Qt can only ask the window manager, and the window manager can override the application's settings. On Windows, Qt can set whatever flags you want.
Definition at line 1189 of file qwidget.cpp.
Referenced by QPrintPropertiesDialog::addItemToOptions(), QColumnViewPrivate::createColumn(), QScriptEdit::extraAreaMouseEvent(), focusPreviousChild(), QMainWindowLayout::getSeparatorWidget(), QAbstractScrollAreaPrivate::init(), QGroupBox::mouseReleaseEvent(), QComboBox::QComboBox(), QDialog::QDialog(), QFrame::QFrame(), QLineEdit::QLineEdit(), QMainWindow::QMainWindow(), QMenuBar::QMenuBar(), QPrintPropertiesDialog::QPrintPropertiesDialog(), QSizeGrip::QSizeGrip(), QTabWidget::QTabWidget(), QToolBar::QToolBar(), QWorkspace::QWorkspace(), QX11EmbedContainer::QX11EmbedContainer(), QWizardPrivate::recreateLayout(), QAbstractButton::setIconSize(), QWorkspace::setScrollBarsEnabled(), QTabBarPrivate::setupMovableTab(), QAbstractScrollArea::setViewport(), QSystemTrayIconSys::sysTrayTracker(), QMenuBarPrivate::updateCornerWidgetToolBar(), xdndEnable(), and xdndObtainData().
QWidget::~QWidget | ( | ) |
Destroys the widget.
All this widget's children are deleted first. The application exits if this widget is the main widget.
Definition at line 1572 of file qwidget.cpp.
|
protected |
Definition at line 1220 of file qwidget.cpp.
bool QWidget::acceptDrops | ( | ) | const |
QString QWidget::accessibleDescription | ( | ) | const |
Referenced by setAccessibleDescription(), and QAccessibleTable2::text().
QString QWidget::accessibleName | ( | ) | const |
Referenced by setAccessibleName(), QLabel::setText(), QAccessibleTable2::text(), and QAccessibleToolButton::text().
|
protectedvirtual |
This event handler is called with the given event whenever the widget's actions are changed.
Reimplemented in QMenu, QToolBar, QTornOffMenu, QMenuBar, and QToolButton.
Definition at line 9600 of file qwidget.cpp.
Referenced by QToolButton::actionEvent(), event(), QToolBar::isAreaAllowed(), and setShown().
Returns the (possibly empty) list of this widget's actions.
Definition at line 3407 of file qwidget.cpp.
Referenced by QMenuBarPrivate::_q_actionHovered(), QMenuBarPrivate::_q_internalShortcutActivated(), QWorkspacePrivate::_q_operationMenuActivated(), QWorkspacePrivate::_q_updateActions(), QMenuBarPrivate::actionAt(), QMenuBarPrivate::actionRect(), QAccessibleMenu::actionText(), QAccessibleWidget::actionText(), QAccessibleMenuBar::actionText(), actualMenuItemVisibility(), QSoftKeyManager::appendSoftkeys(), QMenuBarPrivate::calcActionRects(), QAccessibleMenu::childAt(), QAccessibleMenu::childCount(), QAccessibleMenuBar::childCount(), QMenuBar::clear(), QToolBar::clear(), QMenu::clear(), QAxServerBase::createMenu(), QAxServerBase::createPopup(), QMenuBar::defaultAction(), QAccessibleMenu::doAction(), QAccessibleMenuBar::doAction(), QMenuBarPrivate::focusFirstAction(), QMenuBarPrivate::getNextAction(), QMenuPrivate::hideMenu(), QAccessibleMenu::indexOfChild(), QAccessibleMenuBar::indexOfChild(), QWorkspacePrivate::init(), QMenu::isEmpty(), QUnicodeControlCharacterMenu::menuActionTriggered(), QAxClientSite::OnPosRectChange(), QToolButtonPrivate::popupTimerDone(), qt_wce_get_quit_action(), QTornOffMenu::QTornOffMenu(), QMenuBarPrivate::QWceMenuBarPrivate::rebuild(), QFileDialog::restoreState(), QAccessibleMenu::role(), QAccessibleMenuBar::role(), QToolButton::setDefaultAction(), QAbstractItemView::setEditTriggers(), QMenuBar::setNativeMenuBar(), QMenu::setSeparatorsCollapsible(), QSidebar::showContextMenu(), QAccessibleMenu::state(), QAccessibleMenuBar::state(), QAccessibleMenu::text(), QMenuBarPrivate::updateGeometries(), and QAccessibleWidget::userActionCount().
void QWidget::activateWindow | ( | ) |
Sets the top-level widget containing this widget to be the active window.
An active window is a visible top-level window that has the keyboard input focus.
This function performs the same operation as clicking the mouse on the title bar of a top-level window. On X11, the result depends on the Window Manager. If you want to ensure that the window is stacked on top as well you should also call raise(). Note that the window must be visible, otherwise activateWindow() has no effect.
On Windows, if you are calling this when the application is not currently the active one then it will not make it the active window. It will change the color of the taskbar entry to indicate that the window has changed in some way. This is because Microsoft does not allow an application to interrupt what the user is currently doing in another application.
Definition at line 3363 of file qwidget_mac.mm.
Referenced by QMessageBox::about(), QMessageBox::aboutQt(), QAccessibleWidget::doAction(), QAccessibleApplication::doAction(), QApplicationPrivate::globalEventProcessor(), QWorkspacePrivate::hideChild(), isServerProcess(), QWorkspacePrivate::maximizeWindow(), QWorkspacePrivate::minimizeWindow(), QWorkspacePrivate::normalizeWindow(), qstring_to_xtp(), qt_cleanup(), qt_grab_cursor(), qt_try_modal(), QtWndProc(), QApplication::qwsProcessEvent(), QBBWindow::setVisible(), showFullScreen(), QScriptDebuggerPrivate::startInteraction(), QETWidget::translateMouseEvent(), QSystemTrayIconSys::winEvent(), QApplication::x11ClientMessage(), and QWorkspaceChild::~QWorkspaceChild().
void QWidget::addAction | ( | QAction * | action | ) |
Appends the action action to this widget's list of actions.
All QWidgets have a list of QAction, however they can be represented graphically in many different ways. The default use of the QAction list (as returned by actions()) is to create a context QMenu.
A QWidget should only have one of each action and adding an action it already has will not cause the same action to be in the widget twice.
The ownership of action is not transferred to this QWidget.
Definition at line 3317 of file qwidget.cpp.
Referenced by QDialogButtonBoxPrivate::addButton(), QFileDialogPrivate::createWidgets(), QDialogButtonBox::event(), QMenuBarPrivate::handleReparent(), QToolBar::isAreaAllowed(), QAbstractItemView::keyPressEvent(), QErrorMessage::QErrorMessage(), QProgressDialog::setCancelButton(), QToolButton::setDefaultAction(), QComboBoxPrivateContainer::setItemView(), QPushButton::setMenu(), and QToolButton::setMenu().
Appends the actions actions to this widget's list of actions.
Definition at line 3327 of file qwidget.cpp.
Referenced by QMenu::exec(), QMdiSubWindow::QMdiSubWindow(), and QMenuBarPrivate::updateGeometries().
void QWidget::adjustSize | ( | ) |
Adjusts the size of the widget to fit its contents.
This function uses sizeHint() if it is valid, i.e., the size hint's width and height are >= 0. Otherwise, it sets the size to the children rectangle that covers all child widgets (the union of all child widget rectangles).
For windows, the screen size is also taken into account. If the sizeHint() is less than (200, 100) and the size policy is expanding, the window will be at least (200, 100). The maximum size of a window is 2/3 of the screen's width and height.
Definition at line 8488 of file qwidget.cpp.
Referenced by QWorkspace::addWindow(), QComboBox::setEditable(), setVisible(), and QGraphicsProxyWidgetPrivate::setWidget_helper().
bool QWidget::autoFillBackground | ( | ) | const |
Referenced by resetInputContext().
QPalette::ColorRole QWidget::backgroundRole | ( | ) | const |
Returns the background role of the widget.
The background role defines the brush from the widget's palette that is used to render the background.
If no explicit background role is set, the widget inherts its parent widget's background role.
Definition at line 4677 of file qwidget.cpp.
Referenced by QRenderRule::configurePalette(), QEgl::createSurface(), QPlastiqueStyle::drawComplexControl(), QCleanlooksStyle::drawComplexControl(), QGtkStyle::drawComplexControl(), QPlastiqueStyle::drawControl(), QCleanlooksStyle::drawControl(), QPlastiqueStyle::drawPrimitive(), QStyleSheetStyle::drawPrimitive(), foregroundRole(), QPainter::initFrom(), QAxClientSite::Invoke(), nativeParentWidget(), QGraphicsView::paintEvent(), QGLOverlayWidget::paintGL(), qt_plastique_draw_handle(), qt_plastique_drawFrame(), QDirectFBWindowSurface::updateIsOpaque(), and QToolBoxPrivate::updateTabs().
QSize QWidget::baseSize | ( | ) | const |
Referenced by setDisabled(), and QGraphicsView::sizeHint().
|
protectedvirtual |
This event handler can be reimplemented to handle state changes.
The state being changed in this event can be retrieved through the event supplied.
Change events include: QEvent::ToolBarChange, QEvent::ActivationChange, QEvent::EnabledChange, QEvent::FontChange, QEvent::StyleChange, QEvent::PaletteChange, QEvent::WindowTitleChange, QEvent::IconTextChange, QEvent::ModifiedChange, QEvent::MouseTrackingChange, QEvent::ParentChange, QEvent::WindowStateChange, QEvent::LanguageChange, QEvent::LocaleChange, QEvent::LayoutDirectionChange.
Reimplemented in QWorkspaceChild, QMessageBox, QTextEdit, QFileDialog, QPlainTextEdit, QComboBox, QComboBoxPrivateContainer, QLineEdit, QTabBar, QTabWidget, QMenu, QAbstractSlider, QDialogButtonBox, QAbstractSpinBox, QToolBar, QAbstractButton, QLabel, QMenuBar, QFrame, QProgressDialog, QColorDialog, QSplitter, QToolButton, QFontDialog, QDockWidget, QMdiSubWindow, QToolBox, QWorkspace, QGroupBox, QAxWidget, QRubberBand, QExpandingLineEdit, QErrorMessage, and QWSEmbedWidget.
Definition at line 9170 of file qwidget.cpp.
Referenced by QComboBox::addItems(), QErrorMessage::changeEvent(), QRubberBand::changeEvent(), QGroupBox::changeEvent(), QWorkspace::changeEvent(), QDockWidget::changeEvent(), QFontDialog::changeEvent(), QMdiSubWindow::changeEvent(), QColorDialog::changeEvent(), QProgressDialog::changeEvent(), QFrame::changeEvent(), QMenuBar::changeEvent(), QAbstractButton::changeEvent(), QAbstractSpinBox::changeEvent(), QToolBar::changeEvent(), QDialogButtonBox::changeEvent(), QAbstractSlider::changeEvent(), QMenu::changeEvent(), QTabWidget::changeEvent(), QTabBar::changeEvent(), QLineEdit::changeEvent(), QComboBoxPrivateContainer::changeEvent(), QComboBox::changeEvent(), QFileDialog::changeEvent(), QMessageBox::changeEvent(), QWorkspaceChild::changeEvent(), QMessageBox::critical(), event(), QToolBar::isAreaAllowed(), QDockWidget::isAreaAllowed(), QRubberBand::resize(), and setShown().
|
inline |
Returns the visible child widget at the position ({x}, {y}) in the widget's coordinate system.
If there is no visible child widget at the specified position, the function returns 0.
Definition at line 934 of file qwidget.h.
Referenced by QToolBar::actionAt(), QDialog::contextMenuEvent(), QMainWindow::contextMenuEvent(), QGestureManager::deliverEvents(), QOleDropTarget::DragOver(), QOleDropTarget::Drop(), effectiveState(), QToolBar::event(), flipPoint(), QApplicationPrivate::globalEventProcessor(), QX11Data::motifdndHandle(), parseGeometry(), qt_cleanup(), qt_tabletMotion_scanner(), qt_try_modal(), QtWndProc(), QApplication::qwsProcessEvent(), QGraphicsProxyWidgetPrivate::sendWidgetMouseEvent(), QETWidget::translateMouseEvent(), QApplicationPrivate::translateRawTouchEvent(), QETWidget::translateXinputEvent(), QApplication::widgetAt(), and QApplication::x11ProcessEvent().
Returns the visible child widget at point p in the widget's own coordinate system.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 10283 of file qwidget.cpp.
QRect QWidget::childrenRect | ( | ) | const |
Referenced by setDisabled().
QRegion QWidget::childrenRegion | ( | ) | const |
Referenced by setDisabled().
void QWidget::clearFocus | ( | ) |
Takes keyboard input focus from the widget.
If the widget has active focus, a focus out event is sent to this widget to tell it that it is about to lose the focus.
This widget must enable focus setting in order to get the keyboard input focus, i.e. it must call setFocusPolicy().
Definition at line 6757 of file qwidget.cpp.
Referenced by QtWndProc(), QMdiSubWindowPrivate::setActive(), setAttribute(), QStackedLayout::setCurrentIndex(), setParent(), and ~QWidget().
void QWidget::clearMask | ( | ) |
Removes any mask set by setMask().
Definition at line 13324 of file qwidget.cpp.
Referenced by QShapedPixmapWidget::setPixmap(), QWorkspaceChild::updateMask(), and QApplication::widgetAt().
|
slot |
Closes this widget.
Returns true if the widget was closed; otherwise returns false.
First it sends the widget a QCloseEvent. The widget is hidden if it accepts the close event. If it ignores the event, nothing happens. The default implementation of QWidget::closeEvent() accepts the close event.
If the widget has the Qt::WA_DeleteOnClose flag, the widget is also deleted. A close events is delivered to the widget no matter if the widget is visible or not.
The QApplication::lastWindowClosed() signal is emitted when the last visible primary window (i.e. window with no parent) with the Qt::WA_QuitOnClose attribute set is closed. By default this attribute is set for all widgets except transient windows such as splash screens, tool windows, and popup menus.
Definition at line 8305 of file qwidget.cpp.
Referenced by QMdiAreaPrivate::_q_closeTab(), QWorkspaceChild::childEvent(), QMdiArea::closeAllSubWindows(), QWorkspace::closeAllWindows(), QApplication::closeAllWindows(), QApplication::commitData(), QCalendarPopup::dateSelected(), event(), QMdiSubWindow::eventFilter(), QSplashScreen::finish(), QApplicationPrivate::globalEventProcessor(), QMenuPrivate::hideMenu(), QTipLabel::hideTipImmediately(), QWorkspaceChild::iconWidget(), QMenu::keyPressEvent(), QWhatsThat::keyPressEvent(), keyPressEvent(), QMdiSubWindow::mouseDoubleClickEvent(), QBalloonTip::mousePressEvent(), QWhatsThat::mousePressEvent(), QMdiAreaTabBar::mousePressEvent(), mousePressEvent(), QWhatsThat::mouseReleaseEvent(), onApplicationChangedActivation(), QBalloonTip::QBalloonTip(), QmlApplicationViewer::QmlApplicationViewer(), QtWndProc(), QWorkspaceChild::QWorkspaceChild(), QApplication::qwsProcessEvent(), QDecoration::regionClicked(), QProgressDialog::setAutoClose(), QWellArray::setSelected(), QWidgetPrivate::show_helper(), QBalloonTip::timerEvent(), QETWidget::translateMouseEvent(), QETWidget::translateWheelEvent(), update(), and QApplication::x11ProcessEvent().
|
protectedvirtual |
This event handler is called with the given event when Qt receives a window close request for a top-level widget from the window system.
By default, the event is accepted and the widget is closed. You can reimplement this function to change the way the widget responds to window close requests. For example, you can prevent the window from closing by calling QEvent::ignore() on all events.
Main window applications typically use reimplementations of this function to check whether the user's work has been saved and ask for permission before closing. For example, the Application Example uses a helper function to determine whether or not to close the window:
Reimplemented in QRollEffect, QMessageBox, QAbstractSpinBox, QProgressDialog, QDockWidget, QMdiSubWindow, QDialog, and QAlphaWidget.
Definition at line 9626 of file qwidget.cpp.
Referenced by QAlphaWidget::closeEvent(), QDockWidget::closeEvent(), QAbstractSpinBox::closeEvent(), QRollEffect::closeEvent(), event(), QDockWidget::isAreaAllowed(), and setShown().
QMargins QWidget::contentsMargins | ( | ) | const |
The contentsMargins function returns the widget's contents margins.
Definition at line 7532 of file qwidget.cpp.
QRect QWidget::contentsRect | ( | ) | const |
Returns the area inside the widget's margins.
Definition at line 7544 of file qwidget.cpp.
Referenced by QGroupBoxPrivate::calculateFrame(), QSplitterHandle::closestLegalPosition(), QColorPicker::colPt(), QWorkspaceChild::frameWidth(), QColorPicker::huePt(), QLineEdit::initStyleOption(), QColorPicker::mouseMoveEvent(), QSizeGrip::mousePressEvent(), QColorPicker::mousePressEvent(), QLabel::paintEvent(), QSplitterHandle::paintEvent(), QPlainTextEdit::paintEvent(), QColorPicker::paintEvent(), QColorShowLabel::paintEvent(), QWorkspaceChild::QWorkspaceChild(), QAccessibleMdiSubWindow::rect(), QScriptEdit::resizeEvent(), QSplitterHandle::resizeEvent(), QWorkspaceChild::resizeEvent(), QColorPicker::satPt(), QLineEdit::selectionStart(), QColorPicker::setCol(), QMdiSubWindowPrivate::setMaximizeMode(), QSplitter::setRubberBand(), QLabel::setScaledContents(), QTabWidget::setUpLayout(), QMdiSubWindow::showSystemMenu(), QAccessibleMdiSubWindow::state(), and QFramePrivate::updateFrameWidth().
|
protectedvirtual |
This event handler, for event event, can be reimplemented in a subclass to receive widget context menu events.
The handler is called when the widget's contextMenuPolicy is Qt::DefaultContextMenu.
The default implementation ignores the context event. See the QContextMenuEvent documentation for more details.
Reimplemented in QMdiAreaTabBar, QTextEdit, QWorkspaceTitleBar, QComboBox, QGraphicsView, QPlainTextEdit, QLineEdit, QMainWindow, QLabel, QAbstractSpinBox, QMdiSubWindow, QDialog, QAbstractScrollArea, QMessageBoxDetailsText::TextEdit, QScrollBar, and QmlJSDebugger::ToolBarColorBox.
Definition at line 9645 of file qwidget.cpp.
Referenced by QComboBox::addItems(), QScrollBar::contextMenuEvent(), QToolBar::event(), event(), and setShown().
Qt::ContextMenuPolicy QWidget::contextMenuPolicy | ( | ) | const |
Referenced by contentsRect(), and QAccessibleLineEdit::state().
|
protected |
Creates a new widget window if window is 0, otherwise sets the widget's window to window.
Initializes the window (sets the geometry etc.) if initializeWindow is true. If initializeWindow is false, no initialization is performed. This parameter only makes sense if window is a valid window.
Destroys the old window if destroyOldWindow is true. If destroyOldWindow is false, you are responsible for destroying the window yourself (using platform native code).
The QWidget constructor calls create(0,true,true) to create a window for this widget.
Definition at line 1454 of file qwidget.cpp.
Referenced by QSystemTrayIconSys::addToTray(), QWidgetPrivate::createWinId(), lower(), QGLOverlayWidget::paintGL(), QMacNativeWidget::QMacNativeWidget(), qt_set_winid_on_widget(), raise(), QMacCocoaViewContainer::setCocoaView(), setParent(), setVisible(), and stackUnder().
void QWidget::createWinId | ( | ) |
Definition at line 2626 of file qwidget.cpp.
Referenced by QMainWindow::addDockWidget(), create(), QWidgetPrivate::create_sys(), QMenu::exec(), QClipboardWatcher::getDataInFormat(), QToolBarPrivate::init(), QPageSetupDialogPrivate::openCarbonPageLayout(), QPrintDialogPrivate::openCarbonPrintPanel(), QRubberBand::QRubberBand(), qt_nograb(), qt_tablet_init(), qt_tablet_init_wce(), qt_win_get_existing_directory(), QX11EmbedContainer::QX11EmbedContainer(), QX11EmbedWidget::QX11EmbedWidget(), QDockAreaLayoutInfo::restoreState(), QMainWindow::setUnifiedTitleAndToolBarOnMac(), setupOwner(), and winId().
QCursor QWidget::cursor | ( | ) | const |
Referenced by QLabelPrivate::_q_linkHovered(), QMainWindowPrivate::adjustCursor(), QPlainTextEditPrivate::append(), QLabelPrivate::clearContents(), QLabelPrivate::ensureTextPopulated(), QScriptDebuggerCodeView::event(), QMainWindow::event(), QScriptEdit::extraAreaMouseEvent(), QScriptDebuggerCodeView::find(), QLabel::focusOutEvent(), QTextBrowser::keyPressEvent(), QMdiSubWindow::keyPressEvent(), QPlainTextEdit::keyPressEvent(), QTextEdit::keyPressEvent(), QPlainTextEdit::keyReleaseEvent(), QTextEdit::keyReleaseEvent(), QHeaderView::mouseDoubleClickEvent(), QLineEdit::mousePressEvent(), parseGeometry(), QTextEdit::setAlignment(), QLabel::setSelection(), QTextEdit::setText(), and unsetLayoutDirection().
|
signal |
This signal is emitted when the widget's contextMenuPolicy is Qt::CustomContextMenu, and the user has requested a context menu on the widget.
The position pos is the position of the context menu event that the widget receives. Normally this is in widget coordinates. The exception to this rule is QAbstractScrollArea and its subclasses that map the context menu event to coordinates of the viewport() .
Referenced by event(), QSidebar::init(), and setShown().
|
protected |
Frees up window system resources.
Destroys the widget window if destroyWindow is true.
destroy() calls itself recursively for all the child widgets, passing destroySubWindows for the destroyWindow parameter. To have more control over destruction of subwidgets, destroy subwidgets selectively first.
This function is usually called from the QWidget destructor.
Definition at line 2751 of file qwidget_mac.mm.
Referenced by QWidgetPrivate::isBackgroundInherited(), isServerProcess(), q_createNativeChildrenAndSetParent(), QMacCocoaViewContainer::setCocoaView(), setShown(), QApplication::~QApplication(), and ~QWidget().
|
virtual |
Reimplemented from QPaintDevice.
Definition at line 1235 of file qwidget.cpp.
|
protectedvirtual |
This event handler is called when a drag is in progress and the mouse enters this widget.
The event is passed in the event parameter.
If the event is ignored, the widget won't receive any drag move events.
See the Drag-and-drop documentation for an overview of how to provide drag-and-drop in your application.
Reimplemented in QColorShowLabel, QColorWell, QAbstractItemView, QTextEdit, QGraphicsView, QPlainTextEdit, QLineEdit, QSidebar, and QAbstractScrollArea.
Definition at line 9768 of file qwidget.cpp.
Referenced by event(), QColorWell::QColorWell(), QColorShowLabel::setColor(), and setShown().
|
protectedvirtual |
This event handler is called when a drag is in progress and the mouse leaves this widget.
The event is passed in the event parameter.
See the Drag-and-drop documentation for an overview of how to provide drag-and-drop in your application.
Reimplemented in QColorShowLabel, QColorWell, QAbstractItemView, QTextEdit, QGraphicsView, QPlainTextEdit, QLineEdit, QListView, and QAbstractScrollArea.
Definition at line 9802 of file qwidget.cpp.
Referenced by event(), QColorWell::QColorWell(), QColorShowLabel::setColor(), and setShown().
|
protectedvirtual |
This event handler is called if a drag is in progress, and when any of the following conditions occur: the cursor enters this widget, the cursor moves within this widget, or a modifier key is pressed on the keyboard while this widget has the focus.
The event is passed in the event parameter.
See the Drag-and-drop documentation for an overview of how to provide drag-and-drop in your application.
Reimplemented in QColorWell, QAbstractItemView, QTextEdit, QGraphicsView, QPlainTextEdit, QLineEdit, QTreeView, QListView, and QAbstractScrollArea.
Definition at line 9786 of file qwidget.cpp.
Referenced by event(), QColorWell::QColorWell(), and setShown().
|
protectedvirtual |
This event handler is called when the drag is dropped on this widget.
The event is passed in the event parameter.
See the Drag-and-drop documentation for an overview of how to provide drag-and-drop in your application.
Reimplemented in QColorShowLabel, QColorWell, QTreeWidget, QAbstractItemView, QTableWidget, QTextEdit, QListWidget, QGraphicsView, QPlainTextEdit, QLineEdit, QListView, and QAbstractScrollArea.
Definition at line 9817 of file qwidget.cpp.
Referenced by event(), QColorWell::QColorWell(), QColorShowLabel::setColor(), and setShown().
WId QWidget::effectiveWinId | ( | ) | const |
Returns the effective window system identifier of the widget, i.
e. the native parent's window system identifier.
If the widget is native, this function returns the native widget ID. Otherwise, the window ID of the first native parent widget, i.e., the top-level widget that contains this widget, is returned.
Definition at line 2654 of file qwidget.cpp.
Referenced by QApplicationPrivate::applyX11SpecificCommandLineArguments(), QWinInputContext::composition(), QXIMInputContext::createICData(), QApplicationPrivate::dispatchEnterLeave(), QWindowsVistaStyle::drawComplexControl(), QWinInputContext::enable(), enableIme(), QWinInputContext::endComposition(), QAxServerBase::eventFilter(), findParentforPopup(), findRealWindow(), getNetWmState(), handle_xdnd_position(), QXIMInputContext::isComposing(), QWinInputContext::mouseHandler(), qt_mac_checkForNativeSizeGrip(), qt_mac_desktopSize(), qt_mac_effectiveview_for(), qt_mac_insideKeyWindow(), qt_mac_unregister_widget(), qt_qpa_set_cursor(), qt_win_set_cursor(), qt_x11_enforce_cursor(), qt_xdnd_send_leave(), QtWndProc(), QWinInputContext::reset(), QXIMInputContext::reset(), QXIMInputContext::setFocusWidget(), QWinInputContext::startComposition(), QETWidget::translateMouseEvent(), QWinInputContext::update(), QXIMInputContext::update(), QXIMInputContext::widgetDestroyed(), QApplication::x11EventFilter(), QXIMInputContext::x11FilterEvent(), QApplication::x11ProcessEvent(), xdndEnable(), QX11Data::xdndHandleDrop(), and xdndObtainData().
|
protectedvirtual |
Definition at line 12001 of file qwidget.cpp.
void QWidget::ensurePolished | ( | ) | const |
Ensures that the widget has been polished by QStyle (i.e., has a proper font and palette).
QWidget calls this function after it has been fully constructed but before it is shown the very first time. You can call this function if you want to ensure that the widget is polished before doing an operation, e.g., the correct font size might be needed in the widget's sizeHint() reimplementation. Note that this function is called from the default implementation of sizeHint().
Polishing is useful for final initialization that must happen after all constructors (from base classes as well as from subclasses) have been called.
If you need to change some settings when a widget is polished, reimplement event() and handle the QEvent::Polish event type.
Note: The function is declared const so that it can be called from other const functions (e.g., sizeHint()).
Definition at line 10024 of file qwidget.cpp.
Referenced by QWidgetPrivate::activateChildLayoutsRecursively(), adjustSize(), ensurePolished(), QMdiSubWindow::event(), event(), QMdiSubWindow::minimumSizeHint(), QSplitter::minimumSizeHint(), QMenuBar::minimumSizeHint(), QCalendarWidget::minimumSizeHint(), QLabel::minimumSizeHint(), QAbstractSpinBox::minimumSizeHint(), QLineEdit::minimumSizeHint(), QMenu::popup(), QTipLabel::QTipLabel(), QWhatsThat::QWhatsThat(), QHeaderView::sectionSizeFromContents(), setVisible(), QGraphicsProxyWidgetPrivate::setWidget_helper(), showFullScreen(), showMaximized(), showMinimized(), showNormal(), QRadioButton::sizeHint(), QScrollBar::sizeHint(), QCheckBox::sizeHint(), QPushButton::sizeHint(), QVistaBackButton::sizeHint(), QToolButton::sizeHint(), QSlider::sizeHint(), QProgressBar::sizeHint(), QSplitter::sizeHint(), QMDIControl::sizeHint(), QWellArray::sizeHint(), QMenuBar::sizeHint(), QDockWidgetTitleButton::sizeHint(), QAbstractSpinBox::sizeHint(), QLineEdit::sizeHint(), DetailButton::sizeHint(), QDateTimeEdit::sizeHint(), CloseButton::sizeHint(), QWorkspaceTitleBar::sizeHint(), QMdi::ControllerWidget::sizeHint(), QTableView::sizeHintForColumn(), QAbstractItemView::sizeHintForColumn(), QTreeView::sizeHintForColumn(), QTableView::sizeHintForRow(), QAbstractItemView::sizeHintForRow(), QSplitter::sizes(), QStyleSheetStyle::styleHint(), QLayout::totalHeightForWidth(), QLayout::totalMaximumSize(), QLayout::totalMinimumSize(), QLayout::totalSizeHint(), and QComboBoxPrivate::updateViewContainerPaletteAndOpacity().
|
protectedvirtual |
This event handler can be reimplemented in a subclass to receive widget enter events which are passed in the event parameter.
An event is sent to the widget when the mouse cursor enters the widget.
Reimplemented in QWorkspaceChild, QWorkspaceTitleBar, CloseButton, QMenu, QComboBoxPrivateScroller, QDockWidgetTitleButton, QToolButton, and QVistaBackButton.
Definition at line 9475 of file qwidget.cpp.
Referenced by QVistaBackButton::enterEvent(), QToolButton::enterEvent(), QDockWidgetTitleButton::enterEvent(), CloseButton::enterEvent(), event(), and setShown().
|
protectedvirtual |
This is the main event handler; it handles event event.
You can reimplement this function in a subclass, but we recommend using one of the specialized event handlers instead.
Key press and release events are treated differently from other events. event() checks for Tab and Shift+Tab and tries to move the focus appropriately. If there is no widget to move the focus to (or the key press is not Tab or Shift+Tab), event() calls keyPressEvent().
Mouse and tablet event handling is also slightly special: only when the widget is enabled , event() will call the specialized handlers such as mousePressEvent(); otherwise it will discard the event.
This function returns true if the event was recognized, otherwise it returns false. If the recognized event was accepted (see QEvent::accepted ), any further processing such as event propagation to the parent widget stops.
Reimplemented from QObject.
Reimplemented in QMainWindowTabBar, QCalendarView, QGLWidget, QMdi::ControllerWidget, QMdi::ControlLabel, QTextEdit, QWorkspaceTitleBar, QLineEdit, QPlainTextEdit, QComboBox, QMainWindow, QTabBar, QMenu, QSplitterHandle, QSystemTrayIconSys, QCalendarPopup, QDateTimeEdit, QTabWidget, QDialogButtonBox, QCalendarWidget, QMdiArea, QToolBar, QMenuBar, QLabel, QAbstractSlider, QAbstractButton, QFrame, QAbstractSpinBox, QDockWidget, QX11EmbedContainer, QLCDNumber, QSplitter, QProgressBar, QMdiSubWindow, QToolButton, QTextBrowser, QSpinBox, QWorkspace, QStatusBar, QToolBox, QAbstractScrollArea, QSlider, QMDIControl, QFontComboBox, QGroupBox, QPushButton, QDial, QStackedWidget, QScriptDebuggerCodeView, QScriptEditExtraArea, QScrollArea, QSplashScreen, QRubberBand, QCheckBox, QX11EmbedWidget, QSizeGrip, QCommandLinkButton, QRadioButton, QScrollBar, QFocusFrame, and QMacNativeWidget.
Definition at line 8636 of file qwidget.cpp.
Referenced by QComboBox::addItems(), QSystemTrayIconSys::deliverToolTipEvent(), QX11Data::dndEnable(), QMacNativeWidget::event(), QFocusFrame::event(), QSizeGrip::event(), QX11EmbedWidget::event(), QRubberBand::event(), QSplashScreen::event(), QScriptEditExtraArea::event(), QGroupBox::event(), QMDIControl::event(), QStatusBar::event(), QWorkspace::event(), QDialog::event(), QMdiSubWindow::event(), QProgressBar::event(), QSplitter::event(), QX11EmbedContainer::event(), QDockWidget::event(), QAbstractSpinBox::event(), QFrame::event(), QAxHostWidget::event(), QAbstractButton::event(), QAbstractSlider::event(), QMenuBar::event(), QToolBar::event(), QCalendarWidget::event(), QDialogButtonBox::event(), QTabWidget::event(), QCalendarPopup::event(), QSystemTrayIconSys::event(), QSplitterHandle::event(), QMenu::event(), QTabBar::event(), QMainWindow::event(), QComboBox::event(), QLineEdit::event(), QWorkspaceTitleBar::event(), QMdi::ControlLabel::event(), QMdi::ControllerWidget::event(), QGLWidget::event(), QScriptBreakpointsItemDelegate::eventFilter(), QToolBar::isAreaAllowed(), QDockWidget::isAreaAllowed(), QCalendarWidget::isNavigationBarVisible(), qStoreColors(), qt_egl_create_surface(), QRubberBand::resize(), setCursor(), setFocus(), setToolTip(), QProgressBar::textDirection(), unsetCursor(), and x11EventFilter().
Returns a pointer to the widget with window identifer/handle id.
The window identifier type depends on the underlying window system, see qwindowdefs.h
for the actual definition. If there is no widget with this identifier, 0 is returned.
Definition at line 2517 of file qwidget.cpp.
Referenced by axc_FilterProc(), QWinInputContext::enable(), QX11Data::findClientWindow(), findParentforPopup(), findRealWindow(), QGestureManager::getGestureTargets(), QApplicationPrivate::globalEventProcessor(), QXlibIntegration::grabWindow(), QVNCIntegration::grabWindow(), QPixmap::grabWindow(), handle_xdnd_position(), QBBScreenEventHandler::handleCloseEvent(), QXlibScreen::handleEvent(), QBBScreenEventHandler::handlePointerEvent(), QBBScreenEventHandler::handleTouchEvent(), QBBScreenEventHandler::injectPointerMoveEvent(), QKeyMapperPrivate::isADeadKey(), isServerProcess(), make_widget_eventUPP(), make_win_eventUPP(), QPlainTextEdit::maximumBlockCount(), parseGeometry(), platformWindowFromId(), QGuiEventDispatcherWin32::processEvents(), qax_winEventFilter(), qt_sync_request_scanner(), qt_win_getKeyboardModifiers(), qt_win_set_cursor(), qt_wince_full_screen(), qt_xdnd_send_leave(), QtWndProc(), qWinProcessConfigRequests(), QApplication::qwsProcessEvent(), QTextEdit::setUndoRedoEnabled(), QETWidget::translateMouseEvent(), QApplicationPrivate::translateTouchEvent(), QWinInputContext::update(), QApplication::x11EventFilter(), QApplication::x11ProcessEvent(), and xdndObtainData().
|
protectedvirtual |
This event handler can be reimplemented in a subclass to receive keyboard focus events (focus received) for the widget.
The event is passed in the event parameter
A widget normally must setFocusPolicy() to something other than Qt::NoFocus in order to receive focus events. (Note that the application programmer can call setFocus() on any widget, even those that do not normally accept focus.)
The default implementation updates the widget (except for windows that do not specify a focusPolicy()).
Reimplemented in QAbstractItemView, QTextEdit, QGraphicsView, QPlainTextEdit, QComboBox, QLineEdit, QDateTimeEdit, QWellArray, QLabel, QAbstractSpinBox, QMenuBar, QAbstractButton, QSidebar, QMdiSubWindow, QAxHostWidget, QPushButton, and QGroupBox.
Definition at line 9431 of file qwidget.cpp.
Referenced by QComboBox::addItems(), event(), QGroupBox::focusInEvent(), QAxHostWidget::focusInEvent(), QSidebar::focusInEvent(), QAbstractButton::focusInEvent(), QAbstractSpinBox::focusInEvent(), QLabel::focusInEvent(), QPlainTextEdit::focusInEvent(), QGraphicsView::focusInEvent(), QTextEdit::focusInEvent(), QAbstractItemView::focusInEvent(), setShown(), and QPlainTextEdit::toPlainText().
|
inlineprotected |
Finds a new widget to give the keyboard focus to, as appropriate for Tab, and returns true if it can find a new widget, or false if it can't.
Definition at line 730 of file qwidget.h.
|
protectedvirtual |
Finds a new widget to give the keyboard focus to, as appropriate for Tab and Shift+Tab, and returns true if it can find a new widget, or false if it can't.
If next is true, this function searches forward, if next is false, it searches backward.
Sometimes, you will want to reimplement this function. For example, a web browser might reimplement it to move its "current active link" forward or backward, and call focusNextPrevChild() only when it reaches the last or first link on the "page".
Child widgets call focusNextPrevChild() on their parent widgets, but only the window that contains the child widgets decides where to redirect focus. By reimplementing this function for an object, you thus gain control of focus traversal for all child widgets.
Reimplemented in QAbstractItemView, QTextEdit, QGraphicsView, QPlainTextEdit, QFocusHelper, QDateTimeEdit, QMenu, QLabel, QTextBrowser, QScriptDebuggerConsoleWidget, and QScrollArea.
Definition at line 6836 of file qwidget.cpp.
Referenced by QAxServerBase::ActiveXProc(), event(), focusNextChild(), QScrollArea::focusNextPrevChild(), QScriptDebuggerConsoleWidget::focusNextPrevChild(), QLabel::focusNextPrevChild(), QDateTimeEdit::focusNextPrevChild(), QFocusHelper::focusNextPrevChild(), QPlainTextEdit::focusNextPrevChild(), QGraphicsView::focusNextPrevChild(), QTextEdit::focusNextPrevChild(), QAbstractItemView::focusNextPrevChild(), focusNextPrevChild(), focusPreviousChild(), QAbstractButton::keyPressEvent(), setShown(), QPlainTextEdit::toPlainText(), QAxServerBase::TranslateAcceleratorW(), and QX11EmbedContainer::x11Event().
|
protectedvirtual |
This event handler can be reimplemented in a subclass to receive keyboard focus events (focus lost) for the widget.
The events is passed in the event parameter.
A widget normally must setFocusPolicy() to something other than Qt::NoFocus in order to receive focus events. (Note that the application programmer can call setFocus() on any widget, even those that do not normally accept focus.)
The default implementation updates the widget (except for windows that do not specify a focusPolicy()).
Reimplemented in QAbstractItemView, QTextEdit, QGraphicsView, QPlainTextEdit, QComboBox, QLineEdit, QWellArray, QLabel, QAbstractSpinBox, QAbstractButton, QMenuBar, QMdiSubWindow, QAxHostWidget, QTextBrowser, and QPushButton.
Definition at line 9457 of file qwidget.cpp.
Referenced by QComboBox::addItems(), event(), QAxHostWidget::focusOutEvent(), QAbstractButton::focusOutEvent(), QAbstractSpinBox::focusOutEvent(), QLabel::focusOutEvent(), QPlainTextEdit::focusOutEvent(), QGraphicsView::focusOutEvent(), QTextEdit::focusOutEvent(), QAbstractItemView::focusOutEvent(), setShown(), and QPlainTextEdit::toPlainText().
Qt::FocusPolicy QWidget::focusPolicy | ( | ) | const |
Referenced by QAxClientSite::activateObject(), QAbstractButton::animateClick(), QAbstractButton::event(), QAbstractButtonPrivate::fixFocusPolicy(), QGroupBox::focusInEvent(), focusInEvent(), focusOutEvent(), QAbstractButtonPrivate::moveFocus(), setContextMenuPolicy(), QDialog::setVisible(), and QAccessibleTitleBar::state().
|
inlineprotected |
Finds a new widget to give the keyboard focus to, as appropriate for Shift+Tab, and returns true if it can find a new widget, or false if it can't.
Definition at line 731 of file qwidget.h.
QWidget * QWidget::focusProxy | ( | ) | const |
Returns the focus proxy, or 0 if there is no focus proxy.
Definition at line 6561 of file qwidget.cpp.
Referenced by QAbstractItemViewPrivate::editor(), QWidgetPrivate::effectiveFocusWidget(), QWidgetPrivate::frameStrut(), QX11EmbedContainerPrivate::moveInputToProxy(), QAbstractItemViewPrivate::openEditor(), QApplication::qwsProcessEvent(), QX11EmbedContainerPrivate::QX11EmbedContainerPrivate(), setFocus(), setFocusProxy(), setTabOrder(), and QWinInputContext::updateImeStatus().
QWidget * QWidget::focusWidget | ( | ) | const |
Returns the last child of this widget that setFocus had been called on.
For top level widgets this is the widget that will get focus in case this window gets activated
This is not the same as QApplication::focusWidget(), which returns the focus widget in the currently active window.
Definition at line 6863 of file qwidget.cpp.
Referenced by QGroupBoxPrivate::_q_fixFocus(), QMdiArea::addSubWindow(), QApplicationPrivate::closePopup(), QAbstractItemViewPrivate::editor(), QMotifStyle::event(), QMacStyle::event(), flipPoint(), QScrollArea::focusNextPrevChild(), QApplicationPrivate::focusNextPrevChild_helper(), QApplicationPrivate::globalEventProcessor(), hasFocus(), QGraphicsProxyWidgetPrivate::inputMethodQueryHelper(), QMdiSubWindowPrivate::leaveInteractiveMode(), QAccessibleWidget::navigate(), QApplicationPrivate::openPopup(), qt_cleanup(), qt_try_modal(), QtWndProc(), QApplication::qwsProcessEvent(), QAccessibleWidget::relationTo(), QTest::sendKeyEvent(), QGraphicsProxyWidgetPrivate::sendWidgetKeyEvent(), QWorkspaceChild::setActive(), QApplication::setActiveWindow(), setAttribute(), QMenuBarPrivate::setCurrentAction(), QStackedLayout::setCurrentIndex(), QWidgetPrivate::setEnabled_helper(), setFocus(), QMdiSubWindowPrivate::setFocusWidget(), setParent(), QDialog::setVisible(), QWidgetPrivate::show_sys(), QGraphicsViewPrivate::updateInputMethodSensitivity(), and QGraphicsProxyWidgetPrivate::updateProxyInputMethodAcceptanceFromWidget().
const QFont& QWidget::font | ( | ) | const |
Referenced by QLabel::changeEvent(), QLineEdit::changeEvent(), QComboBox::changeEvent(), QPlainTextEdit::changeEvent(), QTextEdit::changeEvent(), QMessageBox::changeEvent(), QMdiSubWindow::event(), QScriptEdit::extraAreaMouseEvent(), QListWidgetItem::font(), QCalendarModel::formatForCell(), QToolButton::initStyleOption(), QMenu::initStyleOption(), QLineEdit::inputMethodQuery(), inputMethodQuery(), QAxClientSite::Invoke(), QBalloonTip::QBalloonTip(), QFontComboBox::QFontComboBox(), QWizardHeader::QWizardHeader(), QTipLabel::reuseTip(), QHeaderView::sectionSizeFromContents(), setBaseSize(), QFontComboBox::setCurrentFont(), QFontComboBox::sizeHint(), QLineEdit::sizeHint(), QDockWidgetLayout::titleHeight(), QComboBoxListView::viewOptions(), QAbstractItemView::viewOptions(), and QTextEdit::zoomIn().
|
protectedvirtual |
Definition at line 12003 of file qwidget.cpp.
Referenced by QStyleSheetStyle::updateStyleSheetFont().
|
inline |
|
inline |
Returns the font metrics for the widget's current font.
Equivalent to QFontMetrics(widget->font()).
Definition at line 984 of file qwidget.h.
Referenced by QStatusBar::event(), QScriptEdit::extraAreaPaintEvent(), QScriptEdit::extraAreaWidth(), QApplication::fontMetrics(), QStyleOption::init(), QMenuBar::initStyleOption(), QGroupBox::minimumSizeHint(), QProgressBar::minimumSizeHint(), QAbstractSpinBox::minimumSizeHint(), QLineEdit::minimumSizeHint(), QLineEdit::paintEvent(), QWorkspaceTitleBar::paintEvent(), QCommonStyle::pixelMetric(), QPlastiqueStyle::pixelMetric(), QStyleSheetStyle::pixelMetric(), qt_aqua_get_known_size(), QWhatsThat::QWhatsThat(), QStatusBar::reformat(), QExpandingLineEdit::resizeToContents(), QHeaderView::setDefaultSectionSize(), QRadioButton::sizeHint(), QCheckBox::sizeHint(), QPushButton::sizeHint(), QScrollArea::sizeHint(), QToolBoxButton::sizeHint(), QToolButton::sizeHint(), QProgressBar::sizeHint(), QAbstractScrollArea::sizeHint(), QAbstractSpinBox::sizeHint(), DetailButton::sizeHint(), QDateTimeEdit::sizeHint(), QCommonStyle::styleHint(), QWindowsStyle::styleHint(), QTabBar::tabSizeHint(), and QDockWidgetLayout::titleHeight().
QPalette::ColorRole QWidget::foregroundRole | ( | ) | const |
Returns the foreground role.
The foreground role defines the color from the widget's palette that is used to draw the foreground.
If no explicit foreground role is set, the function returns a role that contrasts with the background role.
Definition at line 4728 of file qwidget.cpp.
Referenced by QRenderRule::configurePalette(), QCommonStyle::drawControl(), QPainter::initFrom(), QAxClientSite::Invoke(), and QLabel::paintEvent().
QRect QWidget::frameGeometry | ( | ) | const |
QSize QWidget::frameSize | ( | ) | const |
Referenced by QWidgetPrivate::pointToRect(), QVistaHelper::titleBarSize(), and QVistaHelper::topPadding().
const QRect& QWidget::geometry | ( | ) | const |
Referenced by QMdiSubWindow::changeEvent(), QWindowsVistaStyle::drawPrimitive(), QDockWidget::event(), QMdiSubWindow::eventFilter(), QSystemTrayIconSys::findIconGeometry(), fixToolBarOrientation(), QSystemTrayIconPrivate::geometry_sys(), QAccessibleDisplay::imagePosition(), QMenu::internalDelayedPopup(), QWidgetResizeHandler::keyPressEvent(), QMdiSubWindow::keyPressEvent(), QMdiSubWindowPrivate::leaveRubberBandMode(), QWorkspacePrivate::maximizeWindow(), QVistaHelper::mouseMoveEvent(), QMdiSubWindow::mousePressEvent(), QMdiSubWindow::mouseReleaseEvent(), move(), QMdiAreaPrivate::place(), QMenu::popup(), QtWndProc(), QRubberBand::resize(), resize(), setDisabled(), setGeometry(), QVistaHelper::setWindowPosHack(), QMdiAreaPrivate::showRubberBandFor(), QMdiSubWindow::showShaded(), QETWidget::translateTabletEvent(), QListView::updateGeometries(), QETWidget::updateRegion(), QMdiAreaPrivate::updateScrollBars(), and QWorkspacePrivate::updateWorkspace().
void QWidget::getContentsMargins | ( | int * | left, |
int * | top, | ||
int * | right, | ||
int * | bottom | ||
) | const |
Returns the widget's contents margins for left, top, right, and bottom.
Definition at line 7509 of file qwidget.cpp.
Referenced by QDockAreaLayoutItem::maximumSize(), QDockAreaLayoutItem::minimumSize(), QSplitterPrivate::setGeo(), QGraphicsProxyWidgetPrivate::setWidget_helper(), QComboBox::showPopup(), QDockWidgetLayout::sizeFromContent(), QDockAreaLayoutItem::sizeHint(), and QExpandingLineEdit::updateMinimumWidth().
|
virtual |
Returns the window system handle of the widget, for low-level access.
Using this function is not portable.
An HDC acquired with getDC() has to be released with releaseDC().
Reimplemented from QPaintDevice.
Definition at line 11849 of file qwidget.cpp.
Referenced by QRasterWindowSurface::flush(), and showYellowThing_win().
void QWidget::grabGesture | ( | Qt::GestureType | gesture, |
Qt::GestureFlags | flags = Qt::GestureFlags() |
||
) |
Subscribes the widget to a given gesture with specific flags.
Definition at line 12964 of file qwidget.cpp.
Referenced by QGraphicsScenePrivate::addView(), and QGraphicsView::setupViewport().
void QWidget::grabKeyboard | ( | ) |
Grabs the keyboard input.
This widget receives all keyboard events until releaseKeyboard() is called; other widgets get no keyboard events at all. Mouse events are not affected. Use grabMouse() if you want to grab that.
The focus widget is not affected, except that it doesn't receive any keyboard events. setFocus() moves the focus as usual, but the new focus widget receives keyboard events only after releaseKeyboard() is called.
If a different widget is currently grabbing keyboard input, that widget's grab is released first.
Definition at line 3338 of file qwidget_mac.mm.
Referenced by QWidgetResizeHandler::doMove(), QWidgetResizeHandler::doResize(), isServerProcess(), qstring_to_xtp(), qt_grab_cursor(), and QWhatsThisPrivate::say().
void QWidget::grabMouse | ( | ) |
Grabs the mouse input.
This widget receives all mouse events until releaseMouse() is called; other widgets get no mouse events at all. Keyboard events are not affected. Use grabKeyboard() if you want to grab that.
-nograb
command line option while debugging.It is almost never necessary to grab the mouse when using Qt, as Qt grabs and releases it sensibly. In particular, Qt grabs the mouse when a mouse button is pressed and keeps it until the last button is released.
Definition at line 3308 of file qwidget_mac.mm.
Referenced by QX11Data::dndEnable(), QWidgetResizeHandler::doMove(), QWidgetResizeHandler::doResize(), QWidgetResizeHandler::eventFilter(), findRealWindow(), isServerProcess(), QWidgetResizeHandler::keyPressEvent(), qJournalRecordProc(), qstring_to_xtp(), and qt_grab_cursor().
void QWidget::grabMouse | ( | const QCursor & | cursor | ) |
Definition at line 3319 of file qwidget_mac.mm.
int QWidget::grabShortcut | ( | const QKeySequence & | key, |
Qt::ShortcutContext | context = Qt::WindowShortcut |
||
) |
Adds a shortcut to Qt's shortcut system that watches for the given key sequence in the given context.
If the context is Qt::ApplicationShortcut, the shortcut applies to the application as a whole. Otherwise, it is either local to this widget, Qt::WidgetShortcut, or to the window itself, Qt::WindowShortcut.
If the same key sequence has been grabbed by several widgets, when the key sequence occurs a QEvent::Shortcut event is sent to all the widgets to which it applies in a non-deterministic order, but with the ``ambiguous'' flag set to true.
Definition at line 11747 of file qwidget.cpp.
Referenced by QTabBar::insertTab(), QAbstractButton::setShortcut(), QTabBar::setTabText(), and QGroupBox::setTitle().
QGraphicsEffect * QWidget::graphicsEffect | ( | ) | const |
The graphicsEffect function returns a pointer to the widget's graphics effect.
If the widget has no graphics effect, 0 is returned.
Definition at line 5484 of file qwidget.cpp.
Referenced by QWidgetPrivate::clipToEffectiveMask(), QWidgetPrivate::drawWidget(), QWidgetPrivate::invalidateGraphicsEffectsRecursively(), QWidgetPrivate::isOverlapped(), QWidgetBackingStore::markDirty(), QWidgetPrivate::subtractOpaqueSiblings(), and QWidgetPrivate::updateIsOpaque().
QGraphicsProxyWidget * QWidget::graphicsProxyWidget | ( | ) | const |
Returns the proxy widget for the corresponding embedded widget in a graphics view; otherwise returns 0.
Definition at line 12939 of file qwidget.cpp.
Referenced by QGraphicsProxyWidget::createProxyForChildWidget(), QApplicationPrivate::dispatchEnterLeave(), QComboBoxPrivateContainer::hideEvent(), QApplication::setActiveWindow(), QApplicationPrivate::setFocusWidget(), setParent(), and setWindowOpacity().
bool QWidget::hasFocus | ( | ) | const |
Definition at line 6583 of file qwidget.cpp.
Referenced by QFileDialogPrivate::_q_autoCompleteFileName(), QFileDialogPrivate::_q_selectionChanged(), clearFocus(), QAbstractItemView::closeEditor(), QColorWell::dragLeaveEvent(), QTreeView::drawRow(), QLineEdit::event(), QX11EmbedContainer::eventFilter(), QAxHostWidget::eventFilter(), QMacStylePrivate::eventFilter(), QComboBox::hidePopup(), QStyleOption::init(), QMenuBar::initStyleOption(), QComboBox::initStyleOption(), QLineEdit::inputMethodEvent(), QGraphicsProxyWidgetPrivate::inputMethodQueryHelper(), QAbstractButton::keyPressEvent(), QAbstractItemView::keyPressEvent(), QMenuBar::leaveEvent(), make_widget_eventUPP(), QAccessibleWidget::navigate(), QWellArray::paintCell(), QListView::paintEvent(), QLineEdit::paintEvent(), QtWndProc(), resetInputContext(), QMdiSubWindowPrivate::restoreFocus(), QWorkspaceChild::setActive(), setAttribute(), QLineEdit::setCompleter(), QLineEdit::setEchoMode(), QLineEdit::setPlaceholderText(), QGraphicsView::setScene(), QDialog::setVisible(), QMdiSubWindow::showShaded(), QAccessibleWidget::state(), QAccessibleTabBar::state(), QAccessibleTitleBar::state(), QMacStylePrivate::timerEvent(), QAbstractItemView::viewOptions(), and QX11EmbedContainer::x11Event().
|
inline |
Definition at line 993 of file qwidget.h.
Referenced by axc_FilterProc(), QAbstractScrollArea::event(), QApplicationPrivate::globalEventProcessor(), and QApplication::notify().
|
inline |
Referenced by QWorkspacePrivate::_q_scrollBarChanged(), QCalendarWidgetPrivate::_q_yearClicked(), QDialog::adjustPosition(), QApplicationPrivate::applyX11SpecificCommandLineArguments(), QWorkspace::cascade(), QGraphicsView::centerOn(), QAbstractSpinBox::contextMenuEvent(), QWSDisplay::defineCursor(), QColumnViewPrivate::doLayout(), QTreeView::drawRow(), QGraphicsView::ensureVisible(), QWorkspace::eventFilter(), QWorkspaceChild::eventFilter(), QWizardPrivate::findDefaultBackgroundPixmap(), QMenuBar::heightForWidth(), QTreeView::indexRowSizeHint(), QColorDialogPrivate::init(), inputMethodQuery(), QTreeViewPrivate::itemHeight(), QMenu::keyPressEvent(), QDialog::minimumSizeHint(), QProgressBar::minimumSizeHint(), QRubberBand::move(), move(), QWorkspace::paintEvent(), QMenuBar::paintEvent(), QListView::paintEvent(), QMenu::paintEvent(), QWizard::paintEvent(), QTabBar::paintEvent(), QHeaderView::paintEvent(), QWizardHeader::paintEvent(), QWizardAntiFlickerWidget::paintEvent(), QColorLuminancePicker::paintEvent(), QGLOverlayWidget::paintGL(), QMdiAreaPrivate::place(), QTipLabel::placeTip(), QtWndProc(), QAccessibleTable2::rect(), QAccessibleHeader::rect(), QAccessibleItemView::rect(), QAccessibleSlider::rect(), QAccessibleDial::rect(), QAccessibleTable2HeaderCell::rect(), QComboBoxListView::resizeEvent(), QX11EmbedContainer::resizeEvent(), QMdiSubWindow::resizeEvent(), QColorPicker::resizeEvent(), QAxHostWidget::resizeObject(), QExpandingLineEdit::resizeToContents(), QMdiAreaPrivate::resizeToMinimumTileSize(), QTableView::rowMoved(), QWhatsThisPrivate::say(), QMenuPrivate::scrollerHeight(), QProgressDialog::setBar(), QProgressDialog::setCancelButton(), QProgressDialog::setCancelButtonText(), setFixedWidth(), setGeometry(), QProgressDialog::setLabel(), QProgressDialog::setLabelText(), setMaximumSize(), setMaximumWidth(), setMinimumSize(), setMinimumWidth(), QMdiSubWindowPrivate::setSizeGrip(), QProgressDialog::setValue(), QVistaHelper::setWindowPosHack(), QDial::setWrapping(), QMdiSubWindowPrivate::showButtonsInMenuBar(), QProgressDialog::showEvent(), QWhatsThat::showEvent(), QDialog::showExtension(), QComboBox::showPopup(), QWorkspaceChild::showShaded(), QVistaBackButton::sizeHint(), QDialog::sizeHint(), QAbstractScrollArea::sizeHint(), QProgressDialog::sizeHint(), CloseButton::sizeHint(), QFileDialogListView::sizeHint(), QFileDialogTreeView::sizeHint(), QTableView::sizeHintForRow(), QAbstractItemView::sizeHintForRow(), QWorkspace::tile(), QTableView::updateGeometries(), QListView::updateGeometries(), QTreeViewPrivate::updateScrollBars(), QMessageBoxPrivate::updateSize(), QMdiAreaPrivate::updateTabBarGeometry(), QColorLuminancePicker::val2y(), QTableView::visualRegionForSelection(), QTreeView::visualRegionForSelection(), QHeaderView::visualRegionForSelection(), windowInteractsWithPosition(), and QColorLuminancePicker::y2val().
|
virtual |
Returns the preferred height for this widget, given the width w.
If this widget has a layout, the default implementation returns the layout's preferred height. if there is no layout, the default implementation returns -1 indicating that the preferred height does not depend on the width.
Reimplemented in QTabWidget, QLabel, QMenuBar, and QCommandLinkButton.
Definition at line 10241 of file qwidget.cpp.
Referenced by QLabel::heightForWidth(), menuBarHeightForWidth(), and QScrollAreaPrivate::updateScrollBars().
|
inlineslot |
Hides the widget.
This function is equivalent to setVisible(false).
Definition at line 501 of file qwidget.h.
Referenced by QWizardPrivate::_q_updateButtonStates(), QCalendarWidgetPrivate::_q_yearClicked(), QCalendarWidgetPrivate::_q_yearEditingFinished(), QAxClientSite::activateObject(), QAxServerBase::ActiveXProc(), QMainWindow::addDockWidget(), QMainWindowLayout::applyState(), QLineControl::complete(), QToolBarLayout::createItem(), QCalendarWidgetPrivate::createNavigationBar(), QEgl::createSurface(), QWidgetAction::deleteWidget(), QAccessibleMenu::doAction(), QAccessibleMenuBar::doAction(), QAccessibleMenuItem::doAction(), QDialog::done(), QWizardPrivate::ensureButton(), QInputDialogPrivate::ensureComboBox(), QInputDialogPrivate::ensureDoubleSpinBox(), QInputDialogPrivate::ensureIntSpinBox(), QInputDialogPrivate::ensureLineEdit(), QInputDialogPrivate::ensureListView(), event(), QFocusFrame::eventFilter(), QBalloonTip::hideBalloon(), QWorkspacePrivate::hideChild(), QStatusBar::hideOrShow(), QMdiAreaPrivate::hideRubberBand(), QTabBarPrivate::init(), QToolBox::insertItem(), QStatusBar::insertWidget(), QStackedLayout::insertWidget(), QAxServerBase::internalActivate(), QScriptDebuggerCodeFinderWidget::keyPressEvent(), QScriptNewBreakpointWidget::keyPressEvent(), QFileDialogLineEdit::keyPressEvent(), QDialogButtonBoxPrivate::layoutButtons(), QTabBarPrivate::layoutTabs(), QMdiSubWindowPrivate::leaveRubberBandMode(), QListWidgetItem::listWidget(), make_win_eventUPP(), QWorkspacePrivate::minimizeWindow(), QSplashScreen::mousePressEvent(), mousePressEvent(), QGLOverlayWidget::paintGL(), QLineControl::processKeyEvent(), QColorShower::QColorShower(), QComboBoxPrivateContainer::QComboBoxPrivateContainer(), QMainWindowLayout::QMainWindowLayout(), QScriptDebuggerCodeFinderWidget::QScriptDebuggerCodeFinderWidget(), QScriptNewBreakpointWidget::QScriptNewBreakpointWidget(), qt_mac_unregister_widget(), qt_x11_recreateWidget(), QToolBarLayout::QToolBarLayout(), QApplication::qwsProcessEvent(), QAbstractItemViewPrivate::releaseEditor(), QMdi::ControlContainer::removeButtonsFromMenuBar(), QMainWindow::removeDockWidget(), QWorkspacePrivate::removeIcon(), QMainWindow::removeToolBar(), QStatusBar::removeWidget(), QAlphaWidget::render(), QTreeViewPrivate::renderTreeToPixmapForAnimation(), QProgressDialog::reset(), QDockAreaLayoutInfo::restoreState(), QRollEffect::scroll(), QWizardPrivate::setButtonLayout(), QProgressDialog::setCancelButton(), QAbstractScrollArea::setCornerWidget(), QMenuBarPrivate::setCurrentAction(), QStackedLayout::setCurrentIndex(), QDialog::setExtension(), QToolBarLayout::setGeometry(), QMessageBox::setInformativeText(), QInputDialogPrivate::setInputWidget(), QTreeWidget::setItemHidden(), QProgressDialog::setLabel(), QMainWindow::setMenuBar(), QWizard::setPage(), setParent(), QCompleter::setPopup(), QColumnViewPrivate::setPreviewWidget(), QDeclarativeView::setRootObject(), QFocusFrame::setWidget(), QDockWidgetLayout::setWidgetForRole(), QMdi::ControlContainer::showButtonsInMenuBar(), QScriptEngineDebugger::standardWindow(), QToolBarLayout::takeAt(), QStackedLayout::takeAt(), QETWidget::translateWheelEvent(), QGLContext::updatePaintDevice(), QComboBoxPrivateContainer::updateScrollers(), QDockAreaLayout::updateSeparatorWidgets(), QDialog::~QDialog(), and ~QWidget().
|
protectedvirtual |
This event handler can be reimplemented in a subclass to receive widget hide events.
The event is passed in the event parameter.
Hide events are sent to widgets immediately after they have been hidden.
Note: A widget receives spontaneous show and hide events when its mapping status is changed by the window system, e.g. a spontaneous hide event when the user minimizes the window, and a spontaneous show event when the window is restored again. After receiving a spontaneous hide event, a widget is still considered visible in the sense of isVisible().
Reimplemented in QComboBoxPrivateContainer, QComboBox, QTabBar, QComboBoxPrivateScroller, QMenu, QCalendarPopup, QAbstractSpinBox, QX11EmbedContainer, QMdiSubWindow, QWorkspace, QScrollBar, QSizeGrip, and QWSEmbedWidget.
Definition at line 9864 of file qwidget.cpp.
Referenced by QComboBox::addItems(), event(), QWidgetPrivate::hide_helper(), QSizeGrip::hideEvent(), QAbstractSpinBox::hideEvent(), and setShown().
QInputContext * QWidget::inputContext | ( | ) |
This function returns the QInputContext for this widget.
By default the input context is inherited from the widgets parent. For toplevels it is inherited from QApplication.
You can override this and set a special input context for this widget by using the setInputContext() method.
Definition at line 474 of file qwidget.cpp.
Referenced by QLineEdit::createStandardContextMenu(), QMacInputContext::globalEventProcessor(), QBBScreenEventHandler::handleKeyboardEvent(), QApplication::notify(), qt_keyrelease_scanner(), QtWndProc(), QDeclarativeTextInputPrivate::sendMouseEventToInputContext(), setAttribute(), QWidgetPrivate::setEnabled_helper(), QGraphicsScenePrivate::setFocusItemHelper(), QApplicationPrivate::setFocusWidget(), QGraphicsItem::setInputMethodHints(), setInputMethodHints(), QComboBox::showPopup(), QWSInputContext::translateIMEvent(), updateMicroFocus(), and QApplication::x11ProcessEvent().
|
protectedvirtual |
This event handler, for event event, can be reimplemented in a subclass to receive Input Method composition events.
This handler is called when the state of the input method changes.
Note that when creating custom text editing widgets, the Qt::WA_InputMethodEnabled window attribute must be set explicitly (using the setAttribute() function) in order to receive input method events.
The default implementation calls event->ignore(), which rejects the Input Method event. See the QInputMethodEvent documentation for more details.
Reimplemented in QAbstractItemView, QTextEdit, QGraphicsView, QPlainTextEdit, QComboBox, and QLineEdit.
Definition at line 9668 of file qwidget.cpp.
Referenced by QComboBox::addItems(), event(), setShown(), and QPlainTextEdit::toPlainText().
Qt::InputMethodHints QWidget::inputMethodHints | ( | ) | const |
Referenced by inputMethodQuery(), QLineEdit::setEchoMode(), and setShown().
|
virtual |
This method is only relevant for input widgets.
It is used by the input method to query a set of properties of the widget to be able to support complex input method operations as support for surrounding text and reconversions.
query specifies which property is queried.
Reimplemented in QTextEdit, QPlainTextEdit, QComboBox, QLineEdit, QAbstractItemView, QGraphicsView, and QAbstractSpinBox.
Definition at line 9683 of file qwidget.cpp.
Referenced by QComboBox::addItems(), QBBInputContext::dispatchRequestSoftwareInputPanel(), QScrollArea::ensureWidgetVisible(), event(), QMacInputContext::globalEventProcessor(), QBBInputContext::hasSelectedText(), QAbstractItemView::inputMethodQuery(), QComboBox::inputMethodQuery(), QGraphicsProxyWidgetPrivate::inputMethodQueryHelper(), QBBInputContext::onGetCursorPosition(), QBBInputContext::onGetSelectedText(), QBBInputContext::onGetTextAfterCursor(), QBBInputContext::onGetTextBeforeCursor(), QBBInputContext::onSetComposingRegion(), qt_keyrelease_scanner(), QtWndProc(), QWinInputContext::reconvertString(), setShown(), QPlainTextEdit::toPlainText(), QWSInputContext::translateIMQueryEvent(), QWinInputContext::update(), and QXIMInputContext::update().
Inserts the action action to this widget's list of actions, before the action before.
It appends the action if before is 0 or before is not a valid action for this widget.
A QWidget should only have one of each action.
Definition at line 3342 of file qwidget.cpp.
Referenced by addAction(), addActions(), QAbstractSpinBox::contextMenuEvent(), QMenuBar::defaultAction(), insertActions(), QMenuBar::insertMenu(), QMenu::insertMenu(), QMenuBar::insertSeparator(), QMenu::insertSeparator(), QToolBar::insertSeparator(), QToolBar::insertWidget(), QMenu::setSeparatorsCollapsible(), and QTornOffMenu::syncWithMenu().
Inserts the actions actions to this widget's list of actions, before the action before.
It appends the action if before is 0 or before is not a valid action for this widget.
A QWidget can have at most one of each action.
Definition at line 3376 of file qwidget.cpp.
|
inline |
Returns the window system identifier of the widget, or 0 if the widget is not created yet.
Definition at line 244 of file qwidget.h.
Referenced by QX11PaintEngine::begin(), QPainter::begin(), clearFocus(), clipboardData(), create(), QWidgetPrivate::createWinId(), destroy(), do_size_hints(), QOleDropTarget::DragOver(), QWindowsVistaStyle::drawComplexControl(), effectiveWinId(), QX11EmbedContainer::embedClient(), QX11EmbedWidget::embedInto(), QClipboardWatcher::empty(), QX11EmbedWidget::event(), QX11EmbedContainer::event(), QX11Data::findClientWindow(), flipPoint(), ShivaVGWindowSurface::flush(), QVGWindowSurface::flush(), QGLWindowSurface::flush(), QClipboardWatcher::getDataInFormat(), getNetWmState(), QWidgetPrivate::hide_sys(), QWidgetPrivate::hideChildren(), QKeyMapperPrivate::isADeadKey(), QApplicationPrivate::isAlien(), QWidgetPrivate::isBackgroundInherited(), isProcessBeingDebugged(), isServerProcess(), QWidgetPrivate::mapFromGlobal(), QWidgetBackingStore::markDirtyOnScreen(), QX11Data::motifdndEnable(), QX11Data::motifdndObtainData(), QSizeGrip::mouseMoveEvent(), QX11EmbedContainerPrivate::moveInputToProxy(), nativeParentWidget(), QWidgetPrivate::paintSiblingsRecursive(), QApplicationPrivate::pickMouseReceiver(), previousInFocusChain(), qstring_to_xtp(), qt_change_net_wm_state(), qt_check_clipboard_sentinel(), qt_check_selection_sentinel(), qt_grab_cursor(), qt_insert_sip(), qt_isGenuineQWidget(), qt_mac_nativeview_for(), qt_net_remove_user_time(), qt_net_update_user_time(), qt_qpa_set_cursor(), qt_show_system_menu(), qt_try_modal(), qt_win_set_cursor(), qt_x11_enforce_cursor(), qt_x11_recreateNativeWidgetsRecursive(), qt_x11_wait_for_window_manager(), qt_xfixes_clipboard_changed(), qt_xfixes_selection_changed(), QtCeGetClipboard(), QtCeSetClipboard(), QtWndProc(), QX11EmbedContainer::QX11EmbedContainer(), QX11EmbedWidget::QX11EmbedWidget(), QWidgetBackingStoreTracker::registerWidget(), releaseDC(), QWSDisplay::selectCursor(), QApplicationPrivate::sendMouseEvent(), QApplicationPrivate::sendSyntheticEnterLeave(), setAttribute(), setFocus(), QWSInputContext::setFocusWidget(), QWidgetPrivate::setNetWmWindowTypes(), QWSDisplay::setWindowCaption(), QWidgetPrivate::show_sys(), QWhatsThat::showEvent(), QWidgetBackingStore::showYellowThing(), QWidgetBackingStore::sync(), QETWidget::translateGestureEvent(), translateKeySym(), QETWidget::translateMouseEvent(), QETWidget::translateTabletEvent(), QETWidget::translateWheelEvent(), QApplication::winFocus(), QWSWindowSurface::winId(), winId(), QWindowsXPStylePrivate::winId(), QApplication::x11ClientMessage(), QX11EmbedWidget::x11Event(), QX11EmbedContainer::x11Event(), QApplication::x11ProcessEvent(), xdndEnable(), QX11Data::xdndHandleDrop(), ~QWidget(), QX11EmbedContainer::~QX11EmbedContainer(), and QX11EmbedWidget::~QX11EmbedWidget().
bool QWidget::isActiveWindow | ( | ) | const |
Referenced by QVistaHelper::basicWindowFrameColor(), QAbstractSpinBox::changeEvent(), QPlainTextEdit::changeEvent(), QTextEdit::changeEvent(), QTreeView::drawBranches(), QX11EmbedWidget::eventFilter(), QX11EmbedContainer::eventFilter(), QCalendarModel::formatForCell(), QMenu::initStyleOption(), QWorkspaceChild::paintEvent(), QHeaderView::paintSection(), previousInFocusChain(), QApplication::qwsProcessEvent(), setForegroundRole(), QGraphicsView::setScene(), QDialog::setVisible(), QAccessibleTitleBar::state(), QWorkspaceTitleBar::usesActiveColor(), QGraphicsView::viewportEvent(), QAxClientSite::windowActivationChange(), QX11EmbedWidget::x11Event(), and QApplication::x11ProcessEvent().
bool QWidget::isAncestorOf | ( | const QWidget * | child | ) | const |
Returns true if this widget is a parent, (or grandparent and so on to any level), of the given child, and both widgets are within the same window; otherwise returns false.
Definition at line 8573 of file qwidget.cpp.
Referenced by QMdiSubWindowPrivate::_q_processFocusChanged(), QGestureManager::cancelGesturesForChildren(), QWidgetBackingStore::dirtyRegion(), flipPoint(), QApplicationPrivate::focusNextPrevChild_helper(), iWantTheFocus(), QWidgetBackingStore::moveStaticWidgets(), qt_cleanup(), QWidgetPrivate::reparentFocusWidgets(), QApplicationPrivate::sendSyntheticEnterLeave(), QMdiSubWindowPrivate::setActive(), QStackedLayout::setCurrentIndex(), QMdiSubWindowPrivate::setFocusWidget(), QMdiSubWindowPrivate::setMaximizeMode(), setParent(), QMdiSubWindow::showShaded(), QAccessibleMdiSubWindow::state(), QWidgetBackingStore::staticContents(), QDirectFBWindowSurface::surfaceForWidget(), and QApplicationPrivate::translateRawTouchEvent().
|
inline |
Definition at line 948 of file qwidget.h.
Referenced by QPrintDialogPrivate::_q_printerOrFileSelected(), QGroupBoxPrivate::_q_setChildrenEnabled(), QComboBox::addItems(), QAbstractButton::animateClick(), QGroupBox::changeEvent(), QAbstractButton::changeEvent(), QAbstractSpinBox::changeEvent(), QAbstractSlider::changeEvent(), QMenu::changeEvent(), QComboBox::changeEvent(), QPlainTextEdit::changeEvent(), QTextEdit::changeEvent(), QGroupBox::childEvent(), QAbstractButton::click(), QShortcutMap::correctWidgetContext(), QXIMInputContext::create_xim(), QApplicationPrivate::dispatchEnterLeave(), QAccessibleTabBar::doAction(), QGraphicsProxyWidget::dragMoveEvent(), QTreeView::drawBranches(), QWindowsXPStyle::drawComplexControl(), QCommonStyle::drawPrimitive(), QGtkStyle::drawPrimitive(), QVistaBackButton::enterEvent(), QDockWidgetTitleButton::enterEvent(), CloseButton::enterEvent(), QScrollBar::event(), QAbstractButton::event(), QMessageBox::event(), event(), QAxServerBase::eventFilter(), QGraphicsProxyWidgetPrivate::findFocusChild(), QAbstractItemView::focusNextPrevChild(), QApplicationPrivate::focusNextPrevChild_helper(), QCalendarModel::formatForCell(), QWidgetPrivate::frameStrut(), QX11EmbedWidgetPrivate::getFocusWidget(), QApplicationPrivate::giveFocusAccordingToFocusPolicy(), QApplicationPrivate::globalEventProcessor(), QStyleOption::init(), QMenuBar::initStyleOption(), QMenu::initStyleOption(), QHeaderView::initStyleOption(), QAxClientSite::Invoke(), QKeyMapperPrivate::isADeadKey(), QToolBox::isItemEnabled(), QDialog::keyPressEvent(), QVistaBackButton::leaveEvent(), QDockWidgetTitleButton::leaveEvent(), CloseButton::leaveEvent(), QAbstractButtonPrivate::moveFocus(), QApplication::notify(), QScriptDebuggerLocalsItemDelegate::paint(), QCommandLinkButton::paintEvent(), QVistaBackButton::paintEvent(), QDockWidgetTitleButton::paintEvent(), QLabel::paintEvent(), QSplitterHandle::paintEvent(), CloseButton::paintEvent(), QHeaderView::paintSection(), paintSep(), QMenuBarPrivate::popupAction(), qt_keyrelease_scanner(), qt_try_modal(), qt_x11_enforce_cursor(), QTornOffMenu::QTornOffMenu(), QtWndProc(), QKeyMapper::sendKeyEvent(), setAttribute(), setDisabledStyle(), setFocus(), QApplicationPrivate::setFocusWidget(), setForegroundRole(), setParent(), QGraphicsProxyWidgetPrivate::setWidget_helper(), QAccessibleWidget::state(), QAccessibleMdiSubWindow::state(), QAccessibleTabBar::state(), QAccessibleTitleBar::state(), QWindowsXPStyle::styleHint(), QWizardPrivate::switchToPage(), QMacStylePrivate::timerEvent(), QETWidget::translateKeyEvent(), QETWidget::translateMouseEvent(), QWinInputContext::updateImeStatus(), QGraphicsView::viewportEvent(), and QApplication::x11ProcessEvent().
bool QWidget::isEnabledTo | ( | QWidget * | ancestor | ) | const |
Returns true if this widget would become enabled if ancestor is enabled; otherwise returns false.
This is the case if neither the widget itself nor every parent up to but excluding ancestor has been explicitly disabled.
isEnabledTo(0) is equivalent to isEnabled().
Definition at line 3290 of file qwidget.cpp.
|
inline |
This function is deprecated.
It is equivalent to isEnabled()
Definition at line 954 of file qwidget.h.
bool QWidget::isFullScreen | ( | ) | const |
Definition at line 3153 of file qwidget.cpp.
Referenced by QDialog::adjustPosition(), QWidgetPrivate::hide_sys(), QMenuBarPrivate::macUpdateMenuBarImmediatly(), qt_cleanup(), restoreGeometry(), setDisabled(), QApplicationPrivate::setMaxWindowRect(), QApplicationPrivate::setScreenTransformation(), and QGLContext::updatePaintDevice().
|
inline |
Returns true if the widget is hidden, otherwise returns false.
A hidden widget will only become visible when show() is called on it. It will not be automatically shown when the parent is shown.
To check visibility, use !isVisible() instead (notice the exclamation mark).
isHidden() implies !isVisible(), but a widget can be not visible and not hidden at the same time. This is the case for widgets that are children of widgets that are not visible.
Widgets are hidden if:
Definition at line 1008 of file qwidget.h.
Referenced by QMdiAreaPrivate::_q_currentTabChanged(), QWidgetPrivate::activateChildLayoutsRecursively(), QMdiAreaPrivate::activateWindow(), QLayout::addChildWidget(), QSplitterPrivate::addContribution(), QAbstractScrollArea::addScrollBarWidget(), QDockAreaLayoutInfo::apply(), QAccessibleWidget::childAt(), QAccessibleMainWindow::childAt(), QWidgetPrivate::childAtRecursiveHelper(), QSplitter::childEvent(), QWorkspace::closeAllWindows(), QMdiAreaTabBar::contextMenuEvent(), QColumnViewPrivate::createColumn(), QWidgetPrivate::createRecursively(), do_size_hints(), QSplitterPrivate::doMove(), QSplitterPrivate::doResize(), QMdiSubWindowPrivate::drawTitleBarWhenMaximized(), QToolBar::event(), QMainWindow::event(), event(), QSizeGrip::eventFilter(), QSystemTrayIconSys::findIconGeometry(), QSplitterPrivate::findWidgetJustBeforeOrJustAfter(), QStatusBar::insertPermanentWidget(), QStatusBar::insertWidget(), QSplitterPrivate::insertWidget_helper(), QMdiAreaPrivate::internalRaise(), QWorkspaceChild::internalRaise(), QTreeWidget::isItemHidden(), isVisibleTo(), QWorkspaceChild::isWindowOrIconVisible(), QToolBarLayout::layoutActions(), QListWidgetItem::listWidget(), QTabBarPrivate::makeVisible(), menuBarHeightForWidth(), QSplitter::minimumSizeHint(), QAbstractButtonPrivate::moveFocus(), QSplitter::moveSplitter(), QMdiAreaPrivate::nextVisibleSubWindow(), QTableView::paintEvent(), QWidgetPrivate::paintSiblingsRecursive(), QPlaceHolderItem::QPlaceHolderItem(), QAxServerBase::qt_metacall(), QSplitterPrivate::recalc(), QMainWindowLayout::removeFromMacToolbar(), QToolBarAreaLayout::saveState(), QListViewPrivate::selectAll(), QWidgetAction::setDefaultWidget(), setDisabled(), setFocus(), QApplicationPrivate::setFocusWidget(), QSplitterPrivate::setGeo(), QToolBarLayout::setGeometry(), QFontDialogPrivate::setVisible_sys(), QWorkspaceChild::show(), QComboBox::showPopup(), QSplitter::sizeHint(), QWorkspace::tile(), QWorkspacePrivate::updateWorkspace(), QListView::visualRegionForSelection(), and waitForPopup().
|
inline |
Definition at line 429 of file qwidget.h.
Referenced by QMdiSubWindow::eventFilter(), QScriptEdit::extraAreaPaintEvent(), QAccessibleAbstractScrollArea::isLeftToRight(), QMdiSubWindow::keyPressEvent(), QScriptEdit::resizeEvent(), QMdiSubWindow::resizeEvent(), QMdiArea::scrollContentsBy(), QMdiSubWindow::showSystemMenu(), QScriptEdit::updateExtraAreaWidth(), and QTableView::visualRegionForSelection().
bool QWidget::isMaximized | ( | ) | const |
Definition at line 3074 of file qwidget.cpp.
Referenced by QMdiAreaPrivate::_q_deactivateAllWindows(), QWorkspace::addWindow(), QDialog::adjustPosition(), QMdiAreaTabBar::contextMenuEvent(), QMdiAreaPrivate::emitWindowActivated(), QMdiSubWindow::event(), QWidgetResizeHandler::eventFilter(), make_win_eventUPP(), QMdiSubWindow::maximizedButtonsWidget(), QMdiSubWindow::maximizedSystemMenuIconWidget(), QMdiSubWindow::mouseDoubleClickEvent(), QWorkspaceTitleBar::mouseMoveEvent(), QDecorationStyled::paint(), QDecorationDefault::paint(), QMdiSubWindow::paintEvent(), QMdiAreaPrivate::place(), qt_cleanup(), QApplication::qwsSetCustomColors(), QMdiAreaPrivate::rearrange(), QDecorationDefault::region(), QMdiArea::resizeEvent(), QWorkspaceChild::resizeEvent(), setDisabled(), QApplicationPrivate::setMaxWindowRect(), setMinimumSize(), QApplicationPrivate::setScreenTransformation(), QMdiAreaPrivate::setViewMode(), QMdiArea::showEvent(), showToolTip(), QWorkspacePrivate::showWindow(), QMdiAreaPrivate::updateScrollBars(), and QMdiArea::viewportEvent().
bool QWidget::isMinimized | ( | ) | const |
Definition at line 3027 of file qwidget.cpp.
Referenced by QMdiAreaPrivate::_q_deactivateAllWindows(), QWorkspace::addWindow(), QMdiArea::currentSubWindow(), discardSyncRequest(), QMdiSubWindow::event(), QMdiArea::eventFilter(), QFbScreen::generateRects(), QWidgetPrivate::hide_sys(), make_win_eventUPP(), QMdiSubWindow::minimumSizeHint(), QMdiSubWindow::mouseDoubleClickEvent(), QWidgetResizeHandler::mouseMoveEvent(), QMdiSubWindow::paintEvent(), QMainWindowLayout::plug(), qt_mac_get_widget_rgn(), qt_try_modal(), QtWndProc(), QMdiAreaPrivate::rearrange(), QWorkspace::setActiveWindow(), QMdiSubWindow::showEvent(), QMdiArea::showEvent(), showMinimized(), and QWorkspacePrivate::showWindow().
|
inline |
Definition at line 951 of file qwidget.h.
Referenced by QDialog::closeEvent(), QApplicationPrivate::globalEventProcessor(), previousInFocusChain(), qt_event_activate_timer_callbk(), and QProgressDialog::setValue().
|
inline |
Definition at line 428 of file qwidget.h.
Referenced by QGraphicsView::centerOn(), QSplitterHandle::closestLegalPosition(), QWellArray::columnAt(), QWellArray::columnX(), QGridLayoutPrivate::distribute(), QTreeView::drawBranches(), QTreeView::drawRow(), QWorkspace::eventFilter(), QDateTimeEdit::focusInEvent(), QTreeView::indexRowSizeHint(), QMenuBar::keyPressEvent(), QAbstractSlider::keyPressEvent(), QMenu::keyPressEvent(), QTabWidget::keyPressEvent(), QTabBar::keyPressEvent(), QColumnViewGrip::mouseDoubleClickEvent(), QTabBar::mouseMoveEvent(), QGraphicsView::mouseMoveEvent(), QColumnView::moveCursor(), QTableView::moveCursor(), QTreeView::moveCursor(), QCalendarView::moveCursor(), QColumnViewGrip::moveGrip(), QTabBar::moveTab(), QTableView::paintEvent(), QWellArray::paintEvent(), QMenu::popup(), QAccessibleItemView::rect(), QColumnView::resizeEvent(), QDialog::resizeEvent(), QHeaderView::resizeSection(), QExpandingLineEdit::resizeToContents(), QColumnView::scrollContentsBy(), QTableView::scrollContentsBy(), QTreeView::scrollContentsBy(), QGraphicsView::scrollContentsBy(), QTextEdit::scrollContentsBy(), QColumnView::scrollTo(), QDateTimeEdit::sectionText(), QDateTimeEdit::setDisplayFormat(), QBoxLayout::setGeometry(), QHeaderView::setOffset(), QTableView::setSelection(), QListView::setSelection(), QTreeView::setSelection(), QDialog::setSizeGripEnabled(), QMdiSubWindow::showSystemMenu(), QTableView::timerEvent(), QTreeView::timerEvent(), QTableView::updateGeometries(), QTreeView::visualRect(), and QTreeView::visualRegionForSelection().
|
inline |
Use isWindow() instead.
Definition at line 942 of file qwidget.h.
Referenced by QWindowsXPStyle::drawControl(), QSizeGrip::mouseMoveEvent(), setWindowSurface(), QCoreFuriCuri::timerEvent(), and windowSurface().
|
inline |
Definition at line 1005 of file qwidget.h.
Referenced by QCompleterPrivate::_q_autoResizePopup(), QPrintDialogPrivate::_q_collapseOrExpandDialog(), QMdiAreaPrivate::_q_deactivateAllWindows(), QTextEditPrivate::_q_ensureVisible(), QFileDialogPrivate::_q_selectionChanged(), QAccessibleAbstractScrollArea::accessibleChildren(), QMenuBar::actionEvent(), QMenu::actionEvent(), QAccessibleMenu::actionText(), QAccessibleMenuBar::actionText(), QAccessibleComboBox::actionText(), QWidgetPrivate::activateChildLayoutsRecursively(), activateWindow(), QLayout::addChildWidget(), QMainWindow::addDockWidget(), QDialog::adjustPosition(), QApplication::alert(), QDockAreaLayoutInfo::apply(), QWorkspace::changeEvent(), QMdiSubWindow::changeEvent(), QMenu::changeEvent(), QAccessibleWidget::childAt(), QAccessibleItemRow::childAt(), QAccessibleTextEdit::childAt(), QAccessibleMainWindow::childAt(), QAccessibleTitleBar::childCount(), QSplitter::childEvent(), QWidgetPrivate::clipRect(), QWidgetPrivate::close_helper(), QApplication::closeAllWindows(), QDialog::closeEvent(), QTreeView::columnCountChanged(), QApplication::commitData(), QShortcutMap::correctWidgetContext(), QFileDialogPrivate::createNavServicesDialog(), QEgl::createSurface(), QAbstractItemView::currentChanged(), QAbstractItemView::dataChanged(), discardInvalidateBufferRequest(), discardSyncRequest(), QAccessibleMenu::doAction(), QAccessibleMenuBar::doAction(), QAccessibleMenuItem::doAction(), QMotifStyle::drawComplexControl(), QMotifStyle::drawControl(), QMotifStyle::drawPrimitive(), dumpRecursive(), effectiveState(), QSplitter::event(), QApplication::event(), event(), QWindowsStyle::eventFilter(), QMenuBar::eventFilter(), QMdiArea::eventFilter(), QComboBoxPrivateContainer::eventFilter(), QAxServerBase::eventFilter(), find_child(), QX11Data::findClientWindow(), findWindowThatShouldDisplayMenubar(), flipPoint(), QEventDispatcherMac::flush(), QWidgetPrivate::frameStrut(), QWidgetPrivate::getOpaqueChildren(), QApplicationPrivate::globalEventProcessor(), QWidgetPrivate::hide_sys(), QWorkspace::hideEvent(), QStatusBar::hideOrShow(), QMdiAreaPrivate::hideRubberBand(), QTreeView::indexRowSizeHint(), QSplitterPrivate::insertWidget(), QAxServerBase::internalActivate(), QWidgetPrivate::isOverlapped(), isServerProcess(), QToolTip::isVisible(), isVisibleTo(), QDialog::keyPressEvent(), QAbstractSpinBox::keyPressEvent(), make_widget_eventUPP(), make_win_eventUPP(), QWidgetBackingStore::markDirty(), QMdiSubWindow::maximizedButtonsWidget(), QMdiSubWindow::maximizedSystemMenuIconWidget(), QStatusBarPrivate::messageRect(), QMdiSubWindow::minimumSizeHint(), QListView::mouseMoveEvent(), QMenu::mouseMoveEvent(), QAccessibleTitleBar::navigate(), QStatusBar::paintEvent(), QGLOverlayWidget::paintGL(), parseGeometry(), QMainWindowLayout::plug(), QMenuPrivate::popupAction(), QWidgetPrivate::prepareToRender(), previousInFocusChain(), QLineControl::processKeyEvent(), q_createNativeChildrenAndSetParent(), QBBWindow::QBBWindow(), qstring_to_xtp(), qt_change_net_wm_state(), qt_event_activate_timer_callbk(), qt_mac_get_widget_rgn(), qt_mac_set_drawer_preferred_edge(), qt_mac_should_disable_menu(), qt_qpa_set_cursor(), qt_win_set_cursor(), qt_x11_recreateWidget(), QtWndProc(), QApplication::qwsProcessEvent(), QApplication::qwsSetCustomColors(), QMdiAreaPrivate::rearrange(), QAccessibleWidget::rect(), QAccessibleAbstractScrollArea::rect(), QAccessibleItemRow::rect(), QAccessibleItemView::rect(), QAccessibleTitleBar::rect(), removeInvisibleWidgetsFromList(), repaint(), QETWidget::repaintDecoration(), QLayoutPrivate::reparentChildWidgets(), QColumnView::resizeEvent(), QMdiSubWindow::resizeEvent(), QMdiAreaPrivate::resizeToMinimumTileSize(), QMdiSubWindowPrivate::restoreFocus(), QAbstractItemView::rowsInserted(), scroll(), QTextEdit::scrollToAnchor(), QAbstractItemView::selectionChanged(), QApplicationPrivate::sendSyntheticEnterLeave(), QGraphicsProxyWidgetPrivate::sendWidgetKeyEvent(), QGraphicsProxyWidgetPrivate::sendWidgetMouseEvent(), QApplication::setActiveWindow(), QAbstractItemView::setAlternatingRowColors(), QToolButton::setArrowType(), setAttribute(), QProgressDialog::setBar(), QProgressDialog::setCancelButton(), QProgressDialog::setCancelButtonText(), QMdiAreaPrivate::setChildActivationEnabled(), setContentsMargins(), setDisabledStyle(), QDockWidget::setFloating(), setForegroundRole(), QAbstractScrollArea::setHorizontalScrollBarPolicy(), QAbstractButton::setIconSize(), QProgressDialog::setLabel(), QProgressDialog::setLabelText(), QAbstractSpinBox::setLineEdit(), QComboBox::setLineEdit(), setMask(), QSplitter::setOrientation(), setParent(), QWidgetPrivate::setParent_sys(), QSplashScreen::setPixmap(), QDeclarativeView::setRootObject(), QGraphicsView::setScene(), QWellArray::setSelected(), QMenu::setSeparatorsCollapsible(), QStatusBar::setSizeGripEnabled(), QMenu::setTearOffEnabled(), QToolButton::setToolButtonStyle(), QTabWidget::setUpLayout(), QProgressBar::setValue(), QProgressDialog::setValue(), QAbstractScrollArea::setVerticalScrollBarPolicy(), QAbstractScrollArea::setViewport(), QDialog::setVisible(), setVisible(), QGraphicsProxyWidgetPrivate::setWidget_helper(), setWindowFlags(), QProgressDialog::showEvent(), QWorkspacePrivate::showMaximizeControls(), QErrorMessage::showMessage(), showMinimized(), QCompleterPrivate::showPopup(), QMdiSubWindow::showShaded(), QToolTip::showText(), QMacStyle::sizeFromContents(), QTableView::sizeHintForColumn(), QAccessibleMdiSubWindow::state(), QAccessibleTabBar::state(), QWidgetBackingStore::staticContents(), QWidgetPrivate::subtractOpaqueSiblings(), QDirectFBScreen::surfaceForWidget(), QWidgetBackingStore::sync(), QAbstractItemView::timerEvent(), QPlatformScreen::topLevelAt(), QStatusBarPrivate::tryToShowSizeGrip(), update(), QCalendarWidget::updateCell(), QCalendarWidget::updateCells(), QWidgetPrivate::updateGeometry_helper(), updateMicroFocus(), QGLContext::updatePaintDevice(), QComboBoxPrivateContainer::updateScrollers(), QMdiAreaPrivate::updateTabBarGeometry(), QApplication::x11ProcessEvent(), and ~QWidget().
bool QWidget::isVisibleTo | ( | QWidget * | ancestor | ) | const |
Returns true if this widget would become visible if ancestor is shown; otherwise returns false.
The true case occurs if neither the widget itself nor any parent up to but excluding ancestor has been explicitly hidden.
This function will still return true if the widget is obscured by other windows on the screen, but could be physically visible if it or they were to be moved.
isVisibleTo(0) is identical to isVisible().
Definition at line 8371 of file qwidget.cpp.
Referenced by QGroupBoxPrivate::_q_fixFocus(), QWorkspace::addWindow(), QGraphicsProxyWidgetPrivate::findFocusChild(), QApplicationPrivate::focusNextPrevChild_helper(), QX11EmbedWidgetPrivate::getFocusWidget(), QMdiAreaPrivate::place(), QAbstractScrollAreaPrivate::replaceScrollBar(), and QMacStylePrivate::timerEvent().
|
inline |
Returns true if the widget is an independent window, otherwise returns false.
A window is a widget that isn't visually the child of any other widget and that usually has a frame and a window title.
A window can have a parent widget. It will then be grouped with its parent and deleted when the parent is deleted, minimized when the parent is minimized etc. If supported by the window manager, it will also have a common taskbar entry with its parent.
QDialog and QMainWindow widgets are by default windows, even if a parent widget is specified in the constructor. This behavior is specified by the Qt::Window flag.
Definition at line 945 of file qwidget.h.
Referenced by QLayout::activate(), QWidgetPrivate::activateChildLayoutsRecursively(), activateWindow(), QDialogButtonBoxPrivate::addButton(), QMacStylePrivate::addWidget(), QWidgetAnimator::animate(), QApplicationPrivate::applyX11SpecificCommandLineArguments(), backgroundRole(), QWidgetBackingStore::beginPaint(), changeEvent(), QAccessibleWidget::childAt(), QAccessibleMainWindow::childAt(), QWidgetPrivate::childAtRecursiveHelper(), QSplitter::childEvent(), childWidgets(), QDesktopWidgetPrivate::cleanup(), QWidgetPrivate::clipRect(), QWidgetPrivate::clipToEffectiveMask(), QDialog::contextMenuEvent(), QShortcutMap::correctWidgetContext(), create(), QWidgetPrivate::createRecursively(), QWidgetPrivate::createWinId(), destroy(), QPushButtonPrivate::dialogParent(), QApplicationPrivate::dispatchEnterLeave(), do_size_hints(), QOleDropTarget::DragOver(), QWindowsMobileStyle::drawControl(), QWindowsXPStyle::drawControl(), QWindowsStyle::drawControl(), effectiveState(), QDockWidget::event(), QMacStyle::event(), QToolBar::event(), QDialogButtonBox::event(), event(), QWindowsStyle::eventFilter(), QStyledItemDelegate::eventFilter(), QItemDelegate::eventFilter(), extendedPseudoClass(), QGestureManager::filterEvent(), find_child(), flipPoint(), focusInEvent(), focusNextPrevChild(), focusOutEvent(), QGestureManager::getGestureTargets(), QWidgetPrivate::getOpaqueChildren(), QApplicationPrivate::giveFocusAccordingToFocusPolicy(), QApplicationPrivate::globalEventProcessor(), handle_xdnd_position(), QWidgetPrivate::hide_helper(), QWidgetPrivate::hideChildren(), QDesktopWidgetPrivate::init(), QStyleOption::init(), QGLWidgetPrivate::init(), QApplicationPrivate::isAlien(), isAncestorOf(), QWidgetPrivate::isBackgroundInherited(), isEnabledTo(), QDockWidget::isFloating(), QToolBar::isFloating(), QWindowsXPStylePrivate::isItemViewDelegateLineEdit(), QWidgetPrivate::isOverlapped(), isServerProcess(), isVisibleTo(), lower(), QMenuBarPrivate::macCreateMenuBar(), make_widget_eventUPP(), make_win_eventUPP(), QWidgetBackingStore::markDirtyOnScreen(), menuBarHeightForWidth(), QSizeGrip::mouseMoveEvent(), QWidgetResizeHandler::mouseMoveEvent(), QSizeGrip::mousePressEvent(), move(), QApplication::notify(), QToolBar::paintEvent(), QWidgetPrivate::paintSiblingsRecursive(), QCommonStyle::pixelMetric(), QPlastiqueStyle::pixelMetric(), QMacStyle::pixelMetric(), QWidgetPrivate::pointToRect(), QWidgetPrivate::propagatePaletteChange(), q_createNativeChildrenAndSetParent(), QPlaceHolderItem::QPlaceHolderItem(), QRubberBand::QRubberBand(), qt_cleanup(), qt_grab_cursor(), qt_insert_sip(), qt_mac_is_metal(), qt_mac_posInWindow(), qt_mac_post_retranslateAppMenu(), qt_mac_unregister_widget(), qt_mac_update_widget_position(), qt_mac_updateCursorWithWidgetUnderMouse(), qt_net_update_user_time(), qt_nograb(), qt_sizegrip_topLevelWidget(), qt_try_modal(), qt_x11_enforce_cursor(), qt_x11_wait_for_window_manager(), QtWndProc(), raise(), QETWidget::repaintDecoration(), QMdiAreaPrivate::resizeToMinimumTileSize(), QToolBarAreaLayout::saveState(), QDesktopWidget::screenNumber(), QWidgetPrivate::scroll_sys(), QWidgetPrivate::scrollChildren(), sendResizeEvents(), QApplicationPrivate::sendSyntheticEnterLeave(), setAttribute(), setBaseSize(), QWSWindowSurface::setClipRegion(), setDisabled(), setDisabledStyle(), QToolBarLayout::setExpanded(), setFixedSize(), setFocus(), QApplication::setFont(), QWSWindowSurface::setGeometry(), setGeometry(), setLayout(), QWidgetPrivate::setLayoutDirection_helper(), QWidgetPrivate::setLocale_helper(), setMask(), setMaximumSize(), setMinimumSize(), QWidgetPrivate::setModal_sys(), QApplicationPrivate::setPalette_helper(), setParent(), QWidgetPrivate::setParent_sys(), setSizeIncrement(), setSizePolicy(), QDockWidget::setTitleBarWidget(), QMainWindow::setUnifiedTitleAndToolBarOnMac(), QWidgetPrivate::setUpdatesEnabled_helper(), QDialog::setVisible(), setVisible(), QFocusFrame::setWidget(), QGraphicsProxyWidgetPrivate::setWidget_helper(), QWSDisplay::setWindowCaption(), QApplication::setWindowIcon(), QWidgetPrivate::setWindowIcon_helper(), setWindowOpacity(), QWidgetPrivate::showChildren(), QSoftKeyManager::softkeySource(), stackUnder(), QWidgetPrivate::stackUnder_sys(), QWindowsXPStyle::standardIconImplementation(), QWindowsXPStyle::standardPixmap(), QAccessibleWidget::state(), QWindowsStyle::styleHint(), QGtkStyle::styleHint(), QMacStyle::styleHint(), QWidgetPrivate::subtractOpaqueSiblings(), IsWindowAndNotDrawerOrSheetTest::test(), testAttribute_helper(), QApplication::topLevelWidgets(), QAxServerBase::TranslateAcceleratorW(), QETWidget::translateMouseEvent(), QMainWindowLayout::unplug(), unsetCursor(), unsetLayoutDirection(), QAccessible::updateAccessibility(), QWidgetPrivate::updateFont(), QDirectFBWindowSurface::updateIsOpaque(), QSizeGripPrivate::updateMacSizer(), QGLContext::updatePaintDevice(), QGraphicsProxyWidgetPrivate::updateProxyGeometryFromWidget(), QDesktopWidgetPrivate::updateScreenList(), QStyleSheetStyle::updateStyleSheetFont(), QLayout::widgetEvent(), window(), QWSWindowSurface::winId(), QApplication::x11ProcessEvent(), and ~QWidget().
bool QWidget::isWindowModified | ( | ) | const |
Definition at line 11554 of file qwidget.cpp.
Referenced by QMacStyle::drawComplexControl(), QMdiSubWindow::event(), QWorkspaceChild::eventFilter(), qt_setWindowTitle_helperHelper(), QMdiSubWindow::setWidget(), and tabTextFor().
|
static |
Returns the widget that is currently grabbing the keyboard input.
If no widget in this application is currently grabbing the keyboard, 0 is returned.
Definition at line 3358 of file qwidget_mac.mm.
Referenced by isServerProcess(), qstring_to_xtp(), qt_grab_cursor(), QtWndProc(), QApplication::qwsProcessEvent(), QTest::sendKeyEvent(), and QApplication::x11ProcessEvent().
|
protectedvirtual |
This event handler, for event event, can be reimplemented in a subclass to receive key press events for the widget.
A widget must call setFocusPolicy() to accept focus initially and have focus in order to receive a key press event.
If you reimplement this handler, it is very important that you call the base class implementation if you do not act upon the key.
The default implementation closes popup widgets if the user presses Esc. Otherwise the event is ignored, so that the widget's parent can interpret it.
Note that QKeyEvent starts with isAccepted() == true, so you do not need to call QKeyEvent::accept() - just do not call the base class implementation if you act upon the key.
Reimplemented in QCalendarView, QFileDialogTreeView, QFileDialogListView, QFileDialogLineEdit, QAbstractItemView, QMessageBox, QTextEdit, QGraphicsView, QComboBox, QPlainTextEdit, QLineEdit, QTreeView, QTabBar, QDateTimeEdit, QWhatsThat, QMenu, QTabWidget, QCalendarWidget, QWellArray, QAbstractSlider, QInputDialogDoubleSpinBox, QLabel, QAbstractSpinBox, QAbstractButton, QMenuBar, QMdiSubWindow, QAbstractScrollArea, QDialog, QTextBrowser, QScriptNewBreakpointWidget, QInputDialogSpinBox, QPushButton, QScriptDebuggerConsoleWidget, QScriptDebuggerCodeFinderWidget, and QScriptBreakpointsWidget.
Definition at line 9375 of file qwidget.cpp.
Referenced by QComboBox::addItems(), event(), QCalendarWidget::isNavigationBarVisible(), QScriptDebuggerCodeFinderWidget::keyPressEvent(), QScriptDebuggerConsoleWidget::keyPressEvent(), QScriptNewBreakpointWidget::keyPressEvent(), QCalendarWidget::keyPressEvent(), and setShown().
|
protectedvirtual |
This event handler, for event event, can be reimplemented in a subclass to receive key release events for the widget.
A widget must accept focus initially and have focus in order to receive a key release event.
If you reimplement this handler, it is very important that you call the base class implementation if you do not act upon the key.
The default implementation ignores the event, so that the widget's parent can interpret it.
Note that QKeyEvent starts with isAccepted() == true, so you do not need to call QKeyEvent::accept() - just do not call the base class implementation if you act upon the key.
Reimplemented in QTextEdit, QGraphicsView, QComboBox, QPlainTextEdit, QAbstractSpinBox, and QAbstractButton.
Definition at line 9407 of file qwidget.cpp.
Referenced by QComboBox::addItems(), event(), QGraphicsView::keyReleaseEvent(), setShown(), and QPlainTextEdit::toPlainText().
|
protectedvirtual |
QLayout * QWidget::layout | ( | ) | const |
Returns the layout manager that is installed on this widget, or 0 if no layout manager is installed.
The layout manager sets the geometry of the widget's children that have been added to the layout.
Definition at line 10073 of file qwidget.cpp.
Referenced by QToolBoxPrivate::_q_widgetDestroyed(), QLayout::addChildWidget(), QAbstractScrollAreaScrollBarContainer::addWidget(), QMainWindowPrivate::adjustCursor(), QWidgetPrivate::adjustedSize(), QMainWindow::centralWidget(), QDockWidget::changeEvent(), QLayout::closestAcceptableSize(), QLayoutPrivate::createSpacerItem(), QStackedWidget::currentWidget(), dockedGeometry(), QDockWidgetItem::dockWidgetLayout(), QAccessibleTitleBar::dockWidgetLayout(), QDockWidget::event(), QTreeViewPrivate::expand(), QToolBarAreaLayoutLine::fitLayout(), QWidgetPrivate::hasHeightForWidth(), heightForWidth(), QToolBar::initStyleOption(), QMainWindowLayout::insertIntoMacToolbar(), QTreeViewPrivate::layout(), QMessageBoxPrivate::layoutMinimumWidth(), QMainWindowPrivate::mainWindowLayout(), QMainWindow::menuBar(), QMainWindow::menuWidget(), QMdiSubWindow::minimumSizeHint(), QApplicationPrivate::notify_helper(), QTextEditPrivate::paint(), QDockWidget::paintEvent(), QLabel::paintEvent(), QPlainTextEdit::paintEvent(), QAbstractScrollAreaScrollBarContainer::QAbstractScrollAreaScrollBarContainer(), QBalloonTip::QBalloonTip(), QComboBoxPrivateContainer::QComboBoxPrivateContainer(), QLayout::QLayout(), QMdiSubWindow::QMdiSubWindow(), QMessageBoxDetailsText::QMessageBoxDetailsText(), qt_mainwindow_layout(), QtWndProc(), QWizardHeader::QWizardHeader(), QAccessibleDockWidget::rect(), QAccessibleTitleBar::rect(), QToolBoxPrivate::relayout(), QTextEditPrivate::relayoutDocument(), QMainWindowLayout::removeFromMacToolbar(), QX11EmbedWidget::resizeEvent(), QAbstractScrollAreaScrollBarContainer::scrollBarLayoutIndex(), QMainWindowPrivate::separatorCursor(), QWizard::setButtonLayout(), QCalendarPopup::setCalendarWidget(), QMessageBox::setDetailedText(), QDockWidget::setFeatures(), QRasterWindowSurface::setGeometry(), QToolBar::setIconSize(), QMessageBox::setInformativeText(), QComboBoxPrivateContainer::setItemView(), setLayout(), QMainWindow::setMenuBar(), QDeclarativeView::setRootObject(), QDockWidget::setTitleBarWidget(), QWizardHeader::setup(), setVisible(), QDockWidget::setWidget(), QMdiSubWindow::setWidget(), QWidgetPrivate::show_recursive(), QMdiSubWindowPrivate::showButtonsInMenuBar(), QDialog::showExtension(), showFullScreen(), showMaximized(), showNormal(), QComboBox::showPopup(), QMainWindow::statusBar(), QCommonStyle::subElementRect(), takeLayout(), QDockWidget::titleBarWidget(), QMenuBarPrivate::updateCornerWidgetToolBar(), QWidgetPrivate::updateGeometry_helper(), QWizardPrivate::updateLayout(), QScrollAreaPrivate::updateScrollBars(), QMessageBoxPrivate::updateSize(), QComboBoxPrivateContainer::updateTopBottomMargin(), QStackedWidget::widget(), QDockWidget::widget(), and QAbstractScrollAreaScrollBarContainer::widgets().
Qt::LayoutDirection QWidget::layoutDirection | ( | ) | const |
Referenced by QToolBarAreaLayout::apply(), QTreeView::drawRow(), QVistaHelper::drawTitleBar(), QScrollArea::ensureVisible(), QWizard::event(), fixToolBarOrientation(), QToolBarAreaLayout::gapIndex(), QToolBarAreaLayout::itemRect(), QAbstractScrollArea::keyPressEvent(), QLineEdit::keyPressEvent(), QVistaBackButton::paintEvent(), QLabel::paintEvent(), QMdiAreaPrivate::place(), QMainWindowLayout::setGeometry(), setLayoutDirection(), and QTabBar::tabRect().
|
protectedvirtual |
This event handler can be reimplemented in a subclass to receive widget leave events which are passed in the event parameter.
A leave event is sent to the widget when the mouse cursor leaves the widget.
Reimplemented in QWorkspaceChild, QMdi::ControllerWidget, QWorkspaceTitleBar, CloseButton, QComboBoxPrivateContainer, QMenu, QComboBoxPrivateScroller, QMenuBar, QDockWidgetTitleButton, QMdiSubWindow, QToolButton, QMDIControl, and QVistaBackButton.
Definition at line 9491 of file qwidget.cpp.
Referenced by event(), QMdi::ControllerWidget::hasVisibleControls(), QVistaBackButton::leaveEvent(), QToolButton::leaveEvent(), QDockWidgetTitleButton::leaveEvent(), CloseButton::leaveEvent(), and setShown().
QLocale QWidget::locale | ( | ) | const |
Referenced by QCalendarModel::dayName(), QSpinBox::fixup(), QDoubleSpinBox::fixup(), QCalendarWidget::minimumSizeHint(), setLocale(), QWidgetPrivate::setLocale_helper(), QDateTimeEdit::textFromDateTime(), QSpinBox::textFromValue(), QDoubleSpinBox::textFromValue(), QSpinBoxPrivate::validateAndInterpret(), and QDoubleSpinBoxPrivate::validateAndInterpret().
|
slot |
Lowers the widget to the bottom of the parent widget's stack.
After this call the widget will be visually behind (and therefore obscured by) any overlapping sibling widgets.
Definition at line 11939 of file qwidget.cpp.
Referenced by QMdiAreaPrivate::_q_deactivateAllWindows(), QDockAreaLayoutInfo::apply(), QWorkspacePrivate::insertIcon(), QStackedLayout::insertWidget(), QSplitterPrivate::insertWidget(), QAlphaWidget::render(), QRollEffect::scroll(), and QTabBar::setTabButton().
Qt::HANDLE QWidget::macCGHandle | ( | ) | const |
Returns the CoreGraphics handle of the widget.
Use of this function is not portable. This function will return 0 if no painter context can be established, or if the handle could not be created.
Definition at line 2735 of file qwidget_mac.mm.
|
protectedvirtual |
This special event handler can be reimplemented in a subclass to receive native Macintosh events.
The parameters are a bit different depending if Qt is build against Carbon or Cocoa. In Carbon, caller and event are the corresponding EventHandlerCallRef and EventRef that correspond to the Carbon event handlers that are installed. In Cocoa, caller is always 0 and the EventRef is the EventRef generated from the NSEvent.
In your reimplementation of this function, if you want to stop the event being handled by Qt, return true. If you return false, this native event is passed back to Qt, which translates the event into a Qt event and sends it to the widget.
Definition at line 9918 of file qwidget.cpp.
Referenced by QApplicationPrivate::globalEventProcessor(), make_widget_eventUPP(), qt_mac_sendMacEventToWidget(), and setShown().
Qt::HANDLE QWidget::macQDHandle | ( | ) | const |
Returns the QuickDraw handle of the widget.
Use of this function is not portable. This function will return 0 if QuickDraw is not supported, or if the handle could not be created.
Definition at line 2718 of file qwidget_mac.mm.
Translates the widget coordinate pos from the coordinate system of parent to this widget's coordinate system.
The parent must not be 0 and must be a parent of the calling widget.
Definition at line 4433 of file qwidget.cpp.
Referenced by QMainWindow::contextMenuEvent(), QX11Data::motifdndHandle(), qt_cleanup(), and QApplicationPrivate::sendSyntheticEnterLeave().
Translates the global screen coordinate pos to widget coordinates.
Definition at line 3135 of file qwidget_mac.mm.
Referenced by axc_FilterProc(), QGraphicsViewPrivate::centerView(), QAccessibleWidget::childAt(), QAccessibleTable2::childAt(), QAccessibleTextEdit::childAt(), QAccessibleTree::childAt(), QAccessibleStackedWidget::childAt(), QAccessibleMainWindow::childAt(), QApplicationPrivate::dispatchEnterLeave(), QWidgetResizeHandler::doMove(), QWidgetResizeHandler::doResize(), QOleDropTarget::DragOver(), QOleDropTarget::Drop(), QDockWidget::event(), QToolBar::event(), QWidgetResizeHandler::eventFilter(), QMdiSubWindow::eventFilter(), find_child(), flipPoint(), QGraphicsScenePrivate::gestureEventHandler(), QApplicationPrivate::globalEventProcessor(), QAbstractItemView::horizontalScrollbarValueChanged(), QMainWindowLayout::hover(), QMenu::internalDelayedPopup(), isServerProcess(), QGraphicsItem::isUnderMouse(), QGraphicsScenePrivate::itemsAtPosition(), QMdiSubWindow::keyPressEvent(), QGraphicsScenePrivate::leaveScene(), mapFromGlobal(), QWidgetPrivate::mapFromGlobal(), QGestureEvent::mapToGraphicsScene(), QX11Data::motifdndHandle(), QWidgetResizeHandler::mouseMoveEvent(), QTipLabel::mouseMoveEvent(), QSplitterHandle::mouseMoveEvent(), QWorkspaceTitleBar::mouseMoveEvent(), QGraphicsItem::mouseMoveEvent(), QComboBoxPrivateContainer::mousePressEvent(), QSplitterHandle::mouseReleaseEvent(), QApplication::notify(), QAccessibleTextWidget::offsetAtPoint(), QAccessibleLineEdit::offsetAtPoint(), QWorkspaceTitleBar::paintEvent(), QApplicationPrivate::pickMouseReceiver(), q_createNativeChildrenAndSetParent(), qt_cleanup(), qt_keyrelease_scanner(), qt_mac_update_widget_position(), qt_mac_updateParentUnderAlienWidget(), qt_try_modal(), QtWndProc(), QOleDropTarget::sendDragEnterEvent(), QDeclarativeTextInputPrivate::sendMouseEventToInputContext(), QApplicationPrivate::sendSyntheticEnterLeave(), QGraphicsItem::setCursor(), QCursor::setPos(), QToolTip::showText(), QApplication::topLevelAt(), QETWidget::translateMouseEvent(), QApplicationPrivate::translateRawTouchEvent(), QETWidget::translateTabletEvent(), QETWidget::translateWheelEvent(), QETWidget::translateXinputEvent(), QGraphicsItem::unsetCursor(), QWinInputContext::update(), QGraphicsProxyWidgetPrivate::updateProxyGeometryFromWidget(), QApplicationPrivate::updateTouchPointsForWidget(), QAbstractItemView::verticalScrollbarValueChanged(), and QApplication::widgetAt().
Translates the parent widget coordinate pos to widget coordinates.
Same as mapFromGlobal() if the widget has no parent.
Definition at line 4473 of file qwidget.cpp.
Referenced by find_child(), mapFrom(), parseGeometry(), and QApplication::qwsProcessEvent().
Translates the widget coordinate pos to the coordinate system of parent.
The parent must not be 0 and must be a parent of the calling widget.
Definition at line 4409 of file qwidget.cpp.
Referenced by QX11PaintEngine::begin(), QPainter::begin(), QWidgetBackingStore::beginPaint(), QWidgetBackingStore::bltRect(), QGLWindowSurface::buffer(), QAccessibleTable2::childAt(), QAccessibleTree::childAt(), QWidgetBackingStore::dirtyRegion(), do_size_hints(), QWindowsVistaStyle::drawComplexControl(), QScrollArea::ensureWidgetVisible(), QCalendarWidget::eventFilter(), QX11GLWindowSurface::grabWidget(), QX11WindowSurface::grabWidget(), QWidgetPrivate::isBackgroundInherited(), QWidgetBackingStore::markDirty(), QWidgetBackingStore::markDirtyOnScreen(), QWidgetPrivate::moveRect(), QWindowSurface::offset(), qt_flush(), qt_grab_cursor(), qt_mac_update_widget_position(), QAccessibleItemRow::rect(), QAccessibleTable2Cell::rect(), QWidgetBackingStore::showYellowThing(), QWidgetBackingStore::staticContents(), QGraphicsProxyWidget::subWidgetRect(), QDirectFBWindowSurface::surfaceForWidget(), QDirectFBScreen::surfaceForWidget(), QWidgetBackingStore::sync(), QWSInputContext::translateIMQueryEvent(), QWidgetBackingStore::unflushPaint(), QXIMInputContext::update(), updateRedirectedToGraphicsProxyWidget(), QFocusFramePrivate::updateSize(), visibleRegion(), and QApplication::x11ProcessEvent().
Translates the widget coordinate pos to global screen coordinates.
For example, mapToGlobal(QPoint(0,0))
would give the global coordinates of the top-left pixel of the widget.
Definition at line 3108 of file qwidget_mac.mm.
Referenced by QFileDialogPrivate::_q_showContextMenu(), QDialog::adjustPosition(), QOnScreenRasterPaintEngine::begin(), QAccessibleWidget::childAt(), QAccessibleAbstractScrollArea::childAt(), QAccessibleComboBox::childAt(), QAccessibleMainWindow::childAt(), QDesktopWidgetPrivate::cleanup(), QGraphicsProxyWidget::contextMenuEvent(), QDialog::contextMenuEvent(), QAbstractSpinBox::contextMenuEvent(), QOnScreenRasterPaintEngine::coordinateOffset(), PvrEglScreenSurfaceFunctions::createNativeWindow(), event(), QWorkspace::eventFilter(), QCompleter::eventFilter(), QComboBoxPrivateContainer::eventFilter(), QWSWindowSurface::flush(), QWSYellowSurface::flush(), QWidgetPrivate::frameStrut(), QMacInputContext::globalEventProcessor(), QPixmap::grabWindow(), handle_xdnd_position(), QAccessibleDisplay::imagePosition(), QDesktopWidgetPrivate::init(), QMenu::internalDelayedPopup(), isServerProcess(), QMdiSubWindow::keyPressEvent(), QWidgetPrivate::mapFromGlobal(), mapToGlobal(), QTest::QTouchEventSequence::mapToScreen(), QTest::mouseEvent(), QCalendarPopup::mousePressEvent(), QComboBox::mousePressEvent(), QAbstractButtonPrivate::moveFocus(), QMainWindowLayout::plug(), QMenu::popup(), q_createNativeChildrenAndSetParent(), qt_keyrelease_scanner(), qt_mac_update_intersected_gl_widgets(), qt_mac_update_widget_position(), qt_mac_updateParentUnderAlienWidget(), QtWndProc(), QAccessibleMenu::rect(), QAccessibleWidget::rect(), QAccessibleTable2::rect(), QAccessibleAbstractSpinBox::rect(), QAccessibleAbstractScrollArea::rect(), QAccessibleMenuBar::rect(), QAccessibleToolButton::rect(), QAccessibleHeader::rect(), QAccessibleMenuItem::rect(), QAccessibleDoubleSpinBox::rect(), QAccessibleItemRow::rect(), QAccessibleTextEdit::rect(), QAccessibleScrollBar::rect(), QAccessibleItemView::rect(), QAccessibleTable2Cell::rect(), QAccessibleSlider::rect(), QAccessibleDial::rect(), QAccessibleTabBar::rect(), QAccessibleTable2HeaderCell::rect(), QAccessibleMdiSubWindow::rect(), QAccessibleComboBox::rect(), QAccessibleCalendarWidget::rect(), QAccessibleTitleBar::rect(), QDesktopWidget::screenNumber(), QGraphicsProxyWidgetPrivate::sendWidgetMouseEvent(), PvrEglWindowSurface::setDirectRegion(), QDockWidget::setFloating(), QSidebar::showContextMenu(), QCompleterPrivate::showPopup(), QComboBox::showPopup(), QMdiSubWindow::showSystemMenu(), QAccessibleTable2Cell::state(), QETWidget::translateMouseEvent(), QETWidget::translateRegionEvent(), QWinInputContext::update(), and QDesktopWidgetPrivate::updateScreenList().
Translates the widget coordinate pos to a coordinate in the parent widget.
Same as mapToGlobal() if the widget has no parent.
Definition at line 4459 of file qwidget.cpp.
Referenced by QVistaHelper::drawTitleBar(), handle_xdnd_position(), mapTo(), QMdiSubWindow::mouseMoveEvent(), QWorkspaceTitleBar::mouseMoveEvent(), QMdiSubWindow::mousePressEvent(), QWorkspaceTitleBar::mousePressEvent(), QApplication::notify(), and QVistaBackButton::paintEvent().
QRegion QWidget::mask | ( | ) | const |
Returns the mask currently set on a widget.
If no mask is set the return value will be an empty region.
Definition at line 10058 of file qwidget.cpp.
Referenced by QSystemTrayIconSys::getSysTrayVisualInfo(), make_widget_eventUPP(), QWSMemorySurface::painterOffset(), QGraphicsView::paintEvent(), parseGeometry(), QWidgetPrivate::propagatePaletteChange(), qCanAllocColors(), qt_mac_unregister_widget(), setDisabled(), QWSWindowSurface::setGeometry(), QWSLocalMemSurface::setGeometry(), QShapedPixmapWidget::setPixmap(), showNewMessageBox(), QWidgetPrivate::subtractOpaqueSiblings(), QApplication::topLevelAt(), QRubberBandPrivate::updateMask(), QWorkspaceChild::updateMask(), QApplication::widgetAt(), and QVGEGLWindowSurfacePrivate::windowSurfaceSize().
int QWidget::maximumHeight | ( | ) | const |
QSize QWidget::maximumSize | ( | ) | const |
Referenced by QSplitterPrivate::doResize(), QWorkspaceChild::eventFilter(), fixToolBarOrientation(), QMainWindowLayout::insertIntoMacToolbar(), resize(), setDisabled(), setFixedHeight(), setFixedWidth(), setGeometry(), setMaximumHeight(), setMaximumWidth(), QDialog::showExtension(), QComboBox::showPopup(), QDockWidgetLayout::sizeFromContent(), QDialog::sizeHint(), QWorkspaceChild::sizeHint(), and QWizardPrivate::updateMinMaxSizes().
int QWidget::maximumWidth | ( | ) | const |
|
protectedvirtual |
Internal implementation of the virtual QPaintDevice::metric() function.
m is the metric to get.
Reimplemented from QPaintDevice.
Definition at line 4908 of file qwidget_mac.mm.
Referenced by do_size_hints(), effectiveState(), qt_grab_cursor(), QMainWindow::setIconSize(), QToolBar::setIconSize(), and setShown().
int QWidget::minimumHeight | ( | ) | const |
QSize QWidget::minimumSize | ( | ) | const |
Referenced by QHeaderViewPrivate::cascadingResize(), QSplitterPrivate::doResize(), fixToolBarOrientation(), QMdiAreaPrivate::rearrange(), resize(), setDisabled(), setFixedHeight(), setFixedWidth(), setGeometry(), setMinimumHeight(), setMinimumWidth(), QDialog::showExtension(), QComboBox::showPopup(), QMdiSubWindow::showShaded(), QWorkspaceChild::showShaded(), QDockWidgetLayout::sizeFromContent(), QDialog::sizeHint(), QWorkspaceChild::sizeHint(), and QWizardPrivate::updateMinMaxSizes().
|
virtual |
Reimplemented in QWorkspaceChild, QWatermarkLabel, CloseButton, QComboBox, QInputDialog, QTabBar, QLineEdit, QTabWidget, QAbstractSpinBox, QDockWidgetTitleButton, QAxHostWidget, QErrorMessageTextView, QLabel, QCalendarWidget, QX11EmbedContainer, QMenuBar, QMdiArea, QSplitter, QProgressBar, QSlider, QAbstractScrollArea, QDialog, QDial, QToolButton, QAxWidget, QMdiSubWindow, QGroupBox, QToolBoxButton, QVistaBackButton, QCommandLinkButton, QPushButton, QCheckBox, and QRadioButton.
Referenced by QComboBox::addItems(), adjustSize(), QGroupBox::minimumSizeHint(), QAxWidget::minimumSizeHint(), QDialog::minimumSizeHint(), QX11EmbedContainer::minimumSizeHint(), QAxHostWidget::minimumSizeHint(), QWatermarkLabel::minimumSizeHint(), QWorkspaceChild::minimumSizeHint(), and QScriptDebuggerCodeFinderWidget::QScriptDebuggerCodeFinderWidget().
int QWidget::minimumWidth | ( | ) | const |
|
protectedvirtual |
This event handler, for event event, can be reimplemented in a subclass to receive mouse double click events for the widget.
The default implementation generates a normal mouse press event.
Reimplemented in QCalendarView, QMdi::ControlLabel, QAbstractItemView, QTextEdit, QWorkspaceTitleBar, QGraphicsView, QPlainTextEdit, QLineEdit, QHeaderView, QTreeView, QSystemTrayIconSys, QMdiSubWindow, QAbstractScrollArea, and QColumnViewGrip.
Definition at line 9306 of file qwidget.cpp.
Referenced by event(), QMdiSubWindow::mouseDoubleClickEvent(), and setShown().
|
static |
Returns the widget that is currently grabbing the mouse input.
If no widget in this application is currently grabbing the mouse, 0 is returned.
Definition at line 3353 of file qwidget_mac.mm.
Referenced by QX11Data::dndEnable(), effectiveState(), findRealWindow(), flipPoint(), QApplicationPrivate::globalEventProcessor(), QWidgetPrivate::hide_sys(), isServerProcess(), QApplicationPrivate::leaveModal_sys(), parseGeometry(), QApplicationPrivate::pickMouseReceiver(), qstring_to_xtp(), qt_grab_cursor(), QtWndProc(), QApplication::qwsProcessEvent(), QApplicationPrivate::sendMouseEvent(), QApplicationPrivate::sendSyntheticEnterLeave(), QCursor::setPos(), QWidgetPrivate::show_sys(), QETWidget::translateMouseEvent(), QApplication::x11EventFilter(), and QApplication::x11ProcessEvent().
|
protectedvirtual |
This event handler, for event event, can be reimplemented in a subclass to receive mouse move events for the widget.
If mouse tracking is switched off, mouse move events only occur if a mouse button is pressed while the mouse is being moved. If mouse tracking is switched on, mouse move events occur even if no mouse button is pressed.
QMouseEvent::pos() reports the position of the mouse cursor, relative to this widget. For press and release events, the position is usually the same as the position of the last mouse move event, but it might be different if the user's hand shakes. This is a feature of the underlying window system, not Qt.
If you want to show a tooltip immediately, while the mouse is moving (e.g., to get the mouse coordinates with QMouseEvent::pos() and show them as a tooltip), you must first enable mouse tracking as described above. Then, to ensure that the tooltip is updated immediately, you must call QToolTip::showText() instead of setToolTip() in your implementation of mouseMoveEvent().
Reimplemented in QColorShowLabel, QCalendarView, QColorLuminancePicker, QColorPicker, QMdi::ControllerWidget, QColorWell, QAbstractItemView, QTextEdit, QWorkspaceTitleBar, QGraphicsView, QPlainTextEdit, QLineEdit, QHeaderView, QTreeView, QTabBar, QComboBoxPrivateScroller, QSplitterHandle, QMenu, QWhatsThat, QListView, QAbstractSpinBox, QTipLabel, QLabel, QAbstractButton, QMenuBar, QMdiSubWindow, QTextBrowser, QAbstractScrollArea, QSlider, QGroupBox, QMDIControl, QDial, QCheckBox, QColumnViewGrip, QScriptEditExtraArea, QScrollBar, QRadioButton, QSizeGrip, and QmlJSDebugger::ToolBarColorBox.
Definition at line 9239 of file qwidget.cpp.
Referenced by event(), QMdi::ControllerWidget::hasVisibleControls(), QSizeGrip::mouseMoveEvent(), QMdiSubWindow::mouseMoveEvent(), QColorWell::mouseMoveEvent(), QColorWell::QColorWell(), and setShown().
|
protectedvirtual |
This event handler, for event event, can be reimplemented in a subclass to receive mouse press events for the widget.
If you create new widgets in the mousePressEvent() the mouseReleaseEvent() may not end up where you expect, depending on the underlying window system (or X11 window manager), the widgets' location and maybe more.
The default implementation implements the closing of popup widgets when you click outside the window. For other widget types it does nothing.
Reimplemented in QColorShowLabel, QCalendarView, QColorLuminancePicker, QColorPicker, QMdiAreaTabBar, QMdi::ControllerWidget, QColorWell, QMdi::ControlLabel, QAbstractItemView, QTextEdit, QWorkspaceTitleBar, QGraphicsView, QComboBox, QComboBoxPrivateContainer, QPlainTextEdit, QLineEdit, QHeaderView, QTreeView, QTabBar, QDateTimeEdit, QSplitterHandle, QCalendarPopup, QSystemTrayIconSys, QMenu, QWhatsThat, QInputDialogDoubleSpinBox, QCalendarWidget, QWellArray, QAbstractSpinBox, QLabel, QAbstractButton, QMenuBar, QMdiSubWindow, QInputDialogSpinBox, QBalloonTip, QTextBrowser, QToolButton, QAbstractScrollArea, QSlider, QGroupBox, QMDIControl, QDial, QSplashScreen, QColumnViewGrip, QScriptEditExtraArea, QScrollBar, QSizeGrip, and QmlJSDebugger::ToolBarColorBox.
Definition at line 9261 of file qwidget.cpp.
Referenced by QComboBox::addItems(), event(), QCalendarWidget::isNavigationBarVisible(), mouseDoubleClickEvent(), QSizeGrip::mousePressEvent(), QMdiSubWindow::mousePressEvent(), QCalendarWidget::mousePressEvent(), QCalendarPopup::mousePressEvent(), QComboBox::mousePressEvent(), and setShown().
|
protectedvirtual |
This event handler, for event event, can be reimplemented in a subclass to receive mouse release events for the widget.
Reimplemented in QColorShowLabel, QCalendarView, QMdi::ControllerWidget, QColorWell, QMdi::ControlLabel, QAbstractItemView, QTextEdit, QWorkspaceTitleBar, QGraphicsView, QComboBox, QComboBoxPrivateContainer, QPlainTextEdit, QLineEdit, QHeaderView, QTreeView, QTabBar, QSplitterHandle, QCalendarPopup, QMenu, QWhatsThat, QListView, QWellArray, QAbstractSpinBox, QLabel, QAbstractButton, QMenuBar, QMdiSubWindow, QTextBrowser, QToolButton, QAbstractScrollArea, QSlider, QGroupBox, QMDIControl, QDial, QScriptEditExtraArea, QColumnViewGrip, QScrollBar, and QSizeGrip.
Definition at line 9286 of file qwidget.cpp.
Referenced by QComboBox::addItems(), event(), QSizeGrip::mouseReleaseEvent(), QMdiSubWindow::mouseReleaseEvent(), QColorShowLabel::setColor(), and setShown().
|
inline |
This corresponds to move(QPoint(x, y)).
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 1011 of file qwidget.h.
Referenced by QAxServerBase::ActiveXProc(), QWorkspace::addWindow(), QDialog::adjustPosition(), QWorkspace::arrangeIcons(), QBalloonTip::balloon(), QX11Data::dndEnable(), do_size_hints(), QStatusBar::event(), QAlphaWidget::eventFilter(), findRealWindow(), QWorkspacePrivate::insertIcon(), QComboBox::keyPressEvent(), QTabBarPrivate::layoutTab(), QWidgetResizeHandler::mouseMoveEvent(), QToolBarPrivate::mouseMoveEvent(), QWorkspaceTitleBar::mouseMoveEvent(), QRubberBand::move(), QTipLabel::placeTip(), QDateTimeEditPrivate::positionCalendarPopup(), qt_x11_recreateWidget(), QtWndProc(), qWinProcessConfigRequests(), QWorkspaceChild::QWorkspaceChild(), QApplication::qwsProcessEvent(), QWorkspaceChild::resizeEvent(), QExpandingLineEdit::resizeToContents(), restoreGeometry(), QDockAreaLayoutInfo::restoreState(), QAlphaWidget::run(), QRollEffect::run(), QWhatsThisPrivate::say(), QRollEffect::scroll(), QDockWidget::setFloating(), QSplashScreen::setPixmap(), QMdiSubWindowPrivate::setSizeGrip(), setWindowFlags(), QScrollAreaPrivate::updateWidgetPosition(), and QWorkspacePrivate::updateWorkspace().
void QWidget::move | ( | const QPoint & | p | ) |
Definition at line 7174 of file qwidget.cpp.
|
protectedvirtual |
This event handler can be reimplemented in a subclass to receive widget move events which are passed in the event parameter.
When the widget receives this event, it is already at the new position.
The old position is accessible through QMoveEvent::oldPos().
Reimplemented in QWorkspaceChild, QMdiSubWindow, QRubberBand, QSizeGrip, and QWSEmbedWidget.
Definition at line 9566 of file qwidget.cpp.
Referenced by event(), QMdiSubWindow::moveEvent(), QRubberBand::resize(), and setShown().
QWidget * QWidget::nativeParentWidget | ( | ) | const |
Returns the native parent for this widget, i.
e. the next ancestor widget that has a system identifier, or 0 if it does not have any native parent.
Definition at line 4514 of file qwidget.cpp.
Referenced by QX11PaintEngine::begin(), QPainter::begin(), QWindowsVistaStyle::drawComplexControl(), effectiveWinId(), flipPoint(), ShivaVGWindowSurface::flush(), QVGWindowSurface::flush(), QGLWindowSurface::flush(), QWidgetPrivate::hide_sys(), QWidgetPrivate::isBackgroundInherited(), QWidgetBackingStore::markDirtyOnScreen(), QBBNativeInterface::nativeResourceForWidget(), q_createNativeChildrenAndSetParent(), qt_grab_cursor(), qt_mac_update_widget_position(), qt_mac_updateParentUnderAlienWidget(), qt_x11_enforce_cursor(), QWidgetPrivate::scroll_sys(), QWidgetPrivate::show_sys(), QWidgetBackingStore::showYellowThing(), QXIMInputContext::update(), updateRedirectedToGraphicsProxyWidget(), and QApplication::x11ProcessEvent().
QWidget * QWidget::nextInFocusChain | ( | ) | const |
Returns the next widget in this widget's focus chain.
Definition at line 6873 of file qwidget.cpp.
Referenced by QGroupBoxPrivate::_q_fixFocus(), QAxServerBase::ActiveXProc(), QX11EmbedWidgetPrivate::getFocusWidget(), iWantTheFocus(), QtWndProc(), QMdiSubWindowPrivate::setFocusWidget(), QDialog::setVisible(), and QAxServerBase::TranslateAcceleratorW().
QRect QWidget::normalGeometry | ( | ) | const |
Referenced by saveGeometry(), and setDisabled().
void QWidget::overrideWindowFlags | ( | Qt::WindowFlags | flags | ) |
Sets the window flags for the widget to flags, without telling the window system.
Definition at line 10434 of file qwidget.cpp.
void QWidget::overrideWindowState | ( | Qt::WindowStates | newstate | ) |
The function sets the window state on child widgets similar to setWindowState(). The difference is that the window state changed event has the isOverride() flag set. It exists mainly to keep Q3Workspace working.
Definition at line 3098 of file qwidget.cpp.
Referenced by QWorkspaceChild::adjustToFullscreen(), QMdiSubWindowPrivate::ensureWindowState(), QWorkspaceChild::eventFilter(), QWorkspacePrivate::maximizeWindow(), QWorkspacePrivate::minimizeWindow(), QWorkspacePrivate::normalizeWindow(), QWorkspaceChild::resizeEvent(), QMdiSubWindowPrivate::setActive(), and QWorkspaceChild::showShaded().
|
virtual |
Returns the widget's paint engine.
Note that this function should not be called explicitly by the user, since it's meant for reimplementation purposes only. The function is called by Qt internally, and the default implementation may not always return a valid pointer.
Implements QPaintDevice.
Reimplemented in QGLWidget.
Definition at line 5188 of file qwidget_mac.mm.
Referenced by QWidgetPrivate::drawWidget(), effectiveState(), make_widget_eventUPP(), setAttribute(), QWidgetPrivate::setWindowRole(), and QWidgetBackingStore::showYellowThing().
|
protectedvirtual |
This event handler can be reimplemented in a subclass to receive paint events passed in event.
A paint event is a request to repaint all or part of a widget. It can happen for one of the following reasons:
Many widgets can simply repaint their entire surface when asked to, but some slow widgets need to optimize by painting only the requested region: QPaintEvent::region(). This speed optimization does not change the result, as painting is clipped to that region during event processing. QListView and QTableView do this, for example.
Qt also tries to speed up painting by merging multiple paint events into one. When update() is called several times or the window system sends several paint events, Qt merges these events into one event with a larger region (see QRegion::united()). The repaint() function does not permit this optimization, so we suggest using update() whenever possible.
When the paint event occurs, the update region has normally been erased, so you are painting on the widget's background.
The background can be set using setBackgroundRole() and setPalette().
Since Qt 4.0, QWidget automatically double-buffers its painting, so there is no need to write double-buffering code in paintEvent() to avoid flicker.
Note for the X11 platform: It is possible to toggle global double buffering by calling qt_x11_set_global_double_buffer()
. For example,
Reimplemented in QPrevNextCalButton, QCalToolButton, QColorShowLabel, QWorkspaceChild, QColorLuminancePicker, QColorPicker, QTableCornerButton, QGLWidget, QMdi::ControllerWidget, QWizardAntiFlickerWidget, QMdi::ControlLabel, QFileDialogComboBox, QRollEffect, QShapedPixmapWidget, QTextEdit, QWizardHeader, QWorkspaceTitleBar, QGraphicsView, CloseButton, QComboBox, QPlainTextEdit, QLineEdit, QHeaderView, QDateTimeEdit, QTabBar, QWizard, QComboBoxPrivateScroller, QTreeView, QMenu, QSplitterHandle, QListView, QWhatsThat, QTabWidget, QPagePreview, QSystemTrayIconSys, QWellArray, QMdiArea, QAbstractSpinBox, QTableView, QToolBar, QTipLabel, QLabel, QMenuBar, QAxHostWidget, QAbstractButton, QFrame, QMdiSubWindow, QDockWidgetTitleButton, QDockWidget, QLCDNumber, QTextBrowser, QProgressBar, QX11EmbedContainer, QToolButton, QBalloonTip, QShapedPixmapWidget, QWorkspace, QDeclarativeView, QAbstractScrollArea, QComboBoxListView, QSlider, QPushButton, QStatusBar, QGroupBox, QScriptEdit, QMenuBarExtension, QMDIControl, QDial, QCheckBox, QRubberBand, QToolBoxButton, QVistaBackButton, QColumnViewGrip, QToolBarSeparator, QCommandLinkButton, QAlphaWidget, QSvgWidget, QScrollBar, QScriptEditExtraArea, QFocusFrame, QRadioButton, QToolBarExtension, and QSizeGrip.
Definition at line 9548 of file qwidget.cpp.
Referenced by QComboBox::addItems(), event(), QToolBar::isAreaAllowed(), QDockWidget::isAreaAllowed(), QMdiSubWindow::paintEvent(), QRubberBand::resize(), setShown(), and QProgressBar::textDirection().
const QPalette& QWidget::palette | ( | ) | const |
Referenced by QBalloonTip::balloon(), QLabel::changeEvent(), QLineEdit::changeEvent(), QPlainTextEdit::changeEvent(), QTextEdit::changeEvent(), event(), QScriptEdit::extraAreaPaintEvent(), QCalendarModel::formatForCell(), QMenuBar::initStyleOption(), QMenu::initStyleOption(), QAxClientSite::Invoke(), QMenuBar::minimumSizeHint(), QTabWidget::minimumSizeHint(), QWellArray::paintCell(), QCommandLinkButton::paintEvent(), QStatusBar::paintEvent(), QComboBoxListView::paintEvent(), QMenuBar::paintEvent(), QToolBar::paintEvent(), QWhatsThat::paintEvent(), QSplitterHandle::paintEvent(), QMenu::paintEvent(), QLineEdit::paintEvent(), QPlainTextEdit::paintEvent(), QComboBox::paintEvent(), QWizardHeader::paintEvent(), QColorLuminancePicker::paintEvent(), QWorkspaceChild::paintEvent(), QCalToolButton::paintEvent(), QGLOverlayWidget::paintGL(), QmlJSDebugger::ColorPickerTool::pickColor(), QBalloonTip::QBalloonTip(), QMdiArea::QMdiArea(), QWizardPrivate::recreateLayout(), setForegroundRole(), QToolTip::setPalette(), QWidgetPrivate::setPalette_helper(), QWorkspace::sizeHint(), QMenuBar::sizeHint(), QToolBoxPrivate::updateTabs(), QComboBoxPrivate::updateViewContainerPaletteAndOpacity(), and QComboBoxPrivate::viewContainerPalette().
|
protectedvirtual |
Definition at line 12002 of file qwidget.cpp.
|
inline |
Returns the parent of this widget, or 0 if it does not have any parent widget.
Use the no-argument overload instead.
Definition at line 1035 of file qwidget.h.
Referenced by QMenuPrivate::_q_actionTriggered(), QAccessibleAbstractScrollArea::accessibleChildren(), QWorkspaceChild::activate(), activateWindow(), QDialogButtonBoxPrivate::addButton(), QLayout::addChildWidget(), QSystemTrayIconSys::addToTray(), QWorkspaceChild::adjustToFullscreen(), QToolBar::allowedAreas(), QMainWindowLayout::animationFinished(), QFormLayoutPrivate::arrangeWidgets(), QWidgetPrivate::assignedInputContext(), axc_FilterProc(), backgroundRole(), buddyString(), bypassGraphicsProxyWidget(), QDockWidget::changeEvent(), QToolButton::changeEvent(), QMenuBar::changeEvent(), QWorkspaceChild::changeEvent(), QWorkspaceChild::childEvent(), clearFocus(), QWidgetPrivate::clipRect(), QWidgetPrivate::clipRegion(), QWidgetPrivate::clipToEffectiveMask(), QWidgetPrivate::close_helper(), QMdiSubWindow::closeEvent(), containerWidget(), QDialog::contextMenuEvent(), QMainWindow::contextMenuEvent(), QMdi::ControllerWidget::ControllerWidget(), QShortcutMap::correctWidgetContext(), AccessibleFactory::create(), create(), QWidgetPrivate::create_sys(), QAxWidget::createHostWindow(), QFileDialogPrivate::createNavServicesDialog(), QMainWindow::createPopupMenu(), QGraphicsProxyWidget::createProxyForChildWidget(), QEgl::createSurface(), QWidgetPrivate::createWinId(), QPushButtonPrivate::dialogParent(), QApplicationPrivate::dispatchEnterLeave(), QGridLayoutPrivate::distribute(), do_size_hints(), QLayoutPrivate::doResize(), QColorWell::dragLeaveEvent(), QGraphicsProxyWidget::dragMoveEvent(), QOleDropTarget::DragOver(), QWindowsCEStyle::drawComplexControl(), QWindowsMobileStyle::drawComplexControl(), QMacStyle::drawComplexControl(), QCommonStyle::drawControl(), QPlastiqueStyle::drawControl(), QCleanlooksStyle::drawControl(), QWindowsStyle::drawControl(), QGtkStyle::drawControl(), QMacStyle::drawControl(), QGraphicsScene::drawItems(), QWindowsCEStyle::drawPrimitive(), QCommonStyle::drawPrimitive(), QWindowsVistaStyle::drawPrimitive(), QWindowsMobileStyle::drawPrimitive(), QPlastiqueStyle::drawPrimitive(), QWindowsXPStyle::drawPrimitive(), QWindowsStyle::drawPrimitive(), QMacStyle::drawPrimitive(), QStyleSheetStyle::drawPrimitive(), QWidgetEffectSourcePrivate::effectBoundingRectChanged(), QBoxLayoutPrivate::effectiveMargins(), effectiveState(), QWorkspaceTitleBar::enterEvent(), QGraphicsProxyWidget::event(), QDialog::event(), QDockWidget::event(), QMacStyle::event(), QMenuBar::event(), QToolBar::event(), QDialogButtonBox::event(), QApplication::event(), QStyledItemDelegate::eventFilter(), QItemDelegate::eventFilter(), QMdiSubWindow::eventFilter(), QWorkspaceChild::eventFilter(), QToolBarLayout::expandedSize(), QGestureManager::filterEvent(), findMenubarForWindow(), findParentforPopup(), focusNextPrevChild(), QLineEdit::focusOutEvent(), QWidgetPrivate::frameStrut(), QGraphicsItemPrivate::genericMapFromScene(), QGestureManager::getGestureTargets(), QLayoutPrivate::getMargin(), getNetWmState(), QMainWindowLayout::getSeparatorWidget(), QFormLayoutPrivate::getStyle(), QMainWindowLayout::getTabBar(), QApplicationPrivate::giveFocusAccordingToFocusPolicy(), QApplicationPrivate::globalEventProcessor(), handle_xdnd_position(), QMenuBarPrivate::handleReparent(), QWidgetPrivate::hide_helper(), QWidgetPrivate::hide_sys(), QWorkspaceChild::iconWidget(), QAccessibleComboBox::indexOfChild(), QWidgetPrivate::inheritStyle(), QToolBarPrivate::init(), QGLWidgetPrivate::init(), QWidgetPrivate::init(), QTabBarPrivate::initStyleBaseOption(), QToolBoxButton::initStyleOption(), QToolButton::initStyleOption(), QToolBar::initStyleOption(), QWorkspacePrivate::insertIcon(), QSplitterPrivate::insertWidget_helper(), QWorkspaceChild::internalRaise(), QWidgetPrivate::invalidateGraphicsEffectsRecursively(), QWidgetPrivate::isAboutToShow(), isAncestorOf(), QWidgetPrivate::isBackgroundInherited(), QApplicationPrivate::isBlockedByModal(), isChildOf(), isChildOfQMdiSubWindow(), isEnabledTo(), QWindowsXPStylePrivate::isItemViewDelegateLineEdit(), QWidgetPrivate::isOverlapped(), isServerProcess(), isTreeView(), isVisibleTo(), QGraphicsScenePrivate::itemsAtPosition(), QMdiSubWindow::keyPressEvent(), QAbstractButton::keyPressEvent(), lower(), make_widget_eventUPP(), make_win_eventUPP(), mapFrom(), mapTo(), QGestureEvent::mapToGraphicsScene(), QWorkspacePrivate::maximizeWindow(), QMdiSubWindow::mdiArea(), mdiAreaNavigate(), mdiAreaParent(), QToolBoxButton::minimumSizeHint(), QMenuBar::minimumSizeHint(), QColumnViewGrip::mouseDoubleClickEvent(), QWidgetResizeHandler::mouseMoveEvent(), QSplitterHandle::mouseMoveEvent(), QWorkspaceTitleBar::mouseMoveEvent(), QGraphicsItem::mouseMoveEvent(), QSizeGrip::mousePressEvent(), QCalendarPopup::mousePressEvent(), QSplitterHandle::mouseReleaseEvent(), QToolBarLayout::movable(), QWorkspaceChild::moveEvent(), QColumnViewGrip::moveGrip(), QWidgetPrivate::moveRect(), nativeParentWidget(), QBBNativeInterface::nativeResourceForWidget(), QWidgetPrivate::naturalWidgetFont(), QWidgetPrivate::naturalWidgetPalette(), QAccessibleWidget::navigate(), QAccessibleMenu::navigate(), QAccessibleAbstractScrollArea::navigate(), QAccessibleMdiSubWindow::navigate(), QAccessibleComboBox::navigate(), QWidgetPrivate::nearestGraphicsProxyWidget(), QWorkspacePrivate::normalizeWindow(), QApplication::notify(), QDialog::open(), QPrintDialogPrivate::openWindowsPrintDialogModally(), QToolBarSeparator::paintEvent(), QToolBoxButton::paintEvent(), QSplitterHandle::paintEvent(), QGLOverlayWidget::paintGL(), parentWidget(), QWindowsMobileStyle::pixelMetric(), QMacStyle::pixelMetric(), QStyleSheetStyle::pixelMetric(), QMainWindowLayout::plug(), QWindowsXPStyle::polish(), previousInFocusChain(), q_createNativeChildrenAndSetParent(), QBBWindow::QBBWindow(), QMenuBarExtension::QMenuBarExtension(), qstring_to_xtp(), qt_aqua_get_known_size(), qt_check_if_internal_widget(), qt_event_request_showsheet(), qt_grab_cursor(), qt_mac_can_clickThrough(), qt_mac_get_widget_rgn(), qt_mac_is_ancestor(), qt_mac_is_macdrawer(), qt_mac_is_macsheet(), qt_mac_is_metal(), qt_mac_mouse_inside_answer_rect(), qt_mac_nativeMapFromParent(), qt_mac_posInWindow(), qt_mac_post_retranslateAppMenu(), qt_mac_should_disable_menu(), qt_mac_unregister_widget(), qt_mac_update_widget_position(), qt_mac_updateCursorWithWidgetUnderMouse(), qt_nograb(), qt_sizegrip_topLevelWidget(), qt_try_modal(), qt_x11_enforce_cursor(), qt_x11_recreateWidget(), QToolBarLayout::QToolBarLayout(), QTornOffMenu::QTornOffMenu(), QtWndProc(), QApplication::qwsProcessEvent(), QXcbWindow::QXcbWindow(), raise(), QWidgetPrivate::raise_sys(), QLayoutPrivate::reparentChildWidgets(), QProgressDialog::reset(), QWorkspaceChild::resizeEvent(), QExpandingLineEdit::resizeToContents(), QMdiAreaPrivate::resizeToMinimumTileSize(), QGraphicsWidgetPrivate::resolveLayoutDirection(), QApplicationPrivate::sendSyntheticEnterLeave(), QGraphicsProxyWidgetPrivate::sendWidgetKeyEvent(), setAttribute(), QProgressDialog::setCancelButton(), QAbstractScrollArea::setCornerWidget(), QTabWidget::setCornerWidget(), QWidgetPrivate::setDirtyOpaqueRegion(), QToolBarLayout::setExpanded(), QDialog::setExtension(), setFocus(), QToolBarLayout::setGeometry(), QMainWindowLayout::setGeometry(), QWidgetPrivate::setGeometry_sys(), QToolBar::setIconSize(), QProgressDialog::setLabel(), setMask(), QMdiSubWindowPrivate::setMaximizeMode(), QWidgetPrivate::setModal_sys(), QMenuBar::setNativeMenuBar(), setParent(), QWidgetPrivate::setParent_sys(), QDeclarativeView::setRootObject(), QWellArray::setSelected(), QTabWidget::setTabBar(), QBoxLayoutPrivate::setupGeom(), QGridLayoutPrivate::setupSpacings(), QFormLayoutPrivate::setupVerticalLayoutData(), QDialog::setVisible(), QPageSetupDialog::setVisible(), QColorDialog::setVisible(), QPrintDialog::setVisible(), QXlibWindow::setVisible(), setVisible(), QFocusFrame::setWidget(), QScrollArea::setWidget(), QGraphicsProxyWidgetPrivate::setWidget_helper(), setWindowFlags(), QMessageBox::setWindowModality(), setWindowTitle(), QWidgetPrivate::show_sys(), QFontDialogPrivate::showCocoaFontPanel(), QDialog::showEvent(), QWorkspacePrivate::showMaximizeControls(), QWorkspaceChild::showShaded(), QWorkspacePrivate::showWindow(), QCleanlooksStyle::sizeFromContents(), QMacStyle::sizeFromContents(), QGtkStyle::sizeFromContents(), QStyleSheetStyle::sizeFromContents(), QPushButton::sizeHint(), QToolBarSeparator::sizeHint(), QToolBoxButton::sizeHint(), QMenuBarExtension::sizeHint(), QMdiArea::sizeHint(), QMenuBar::sizeHint(), QSplitterHandle::sizeHint(), QSoftKeyManager::softkeySource(), stackUnder(), QWidgetPrivate::stackUnder_sys(), QAccessibleMdiSubWindow::state(), QMacStyle::styleHint(), QMacStyle::subControlRect(), QMacStyle::subElementRect(), QStyleSheetStyle::subElementRect(), QWidgetPrivate::subtractOpaqueSiblings(), testAttribute(), toolbarInUnifiedToolBar(), QETWidget::translateMouseEvent(), unsetLayoutDirection(), unstylable(), QAccessible::updateAccessibility(), QWidgetPrivate::updateGeometry_helper(), QMenuPrivate::updateLayoutDirection(), QWorkspaceChild::updateMask(), QGraphicsProxyWidgetPrivate::updateProxyGeometryFromWidget(), updateRedirectedToGraphicsProxyWidget(), QFocusFramePrivate::updateSize(), QMdi::ControlLabel::updateWindowIcon(), QHeaderView::viewportEvent(), QWizardHeader::vistaDisabled(), waitForPopup(), QLayout::widgetEvent(), QMacStyle::widgetSizePolicy(), window(), windowSurface(), QApplication::winFocus(), QApplication::x11ClientMessage(), QToolBar::~QToolBar(), and QWorkspaceChild::~QWorkspaceChild().
QPoint QWidget::pos | ( | ) | const |
Referenced by QMainWindowPrivate::adjustCursor(), QSplitterPrivate::adjustPos(), QDialog::adjustPosition(), axc_FilterProc(), QTreeViewPrivate::calcLogicalIndices(), QGraphicsView::centerOn(), QAbstractSpinBox::contextMenuEvent(), QDateTimeEdit::dateTimeFromText(), QAbstractItemView::doAutoScroll(), QSplitterPrivate::doResize(), QLCDNumberPrivate::drawSegment(), QLCDNumberPrivate::drawString(), QScriptDebuggerCodeView::event(), QGroupBox::event(), QStatusBar::event(), QDockWidget::event(), QToolBar::event(), QTabBar::event(), QMainWindow::event(), event(), QTipLabel::eventFilter(), QCalendarWidget::eventFilter(), QMenu::exec(), fixToolBarOrientation(), QCalendarView::handleMouseEvent(), QAccessibleDisplay::imagePosition(), QToolButton::initStyleOption(), insertAction(), QMenu::internalDelayedPopup(), QMdiSubWindow::keyPressEvent(), QDateTimeEdit::keyPressEvent(), QVistaHelper::leftMargin(), mapTo(), QHeaderView::mouseDoubleClickEvent(), QMenuPrivate::mouseEventTaken(), QTipLabel::mouseMoveEvent(), QSplitterHandle::mouseMoveEvent(), QComboBoxPrivateScroller::mouseMoveEvent(), QHeaderView::mouseMoveEvent(), QPlainTextEdit::mouseMoveEvent(), QTextEdit::mouseMoveEvent(), QWellArray::mousePressEvent(), QHeaderView::mousePressEvent(), QAbstractItemView::mousePressEvent(), QSplitterHandle::mouseReleaseEvent(), QHeaderView::mouseReleaseEvent(), QAbstractItemView::mouseReleaseEvent(), QSplitter::moveSplitter(), QSplitterHandle::moveSplitter(), parseGeometry(), QTipLabel::placeTip(), QMenu::popup(), QMenuBarPrivate::popupAction(), QtWndProc(), QApplication::qwsProcessEvent(), QTreeViewPrivate::renderTreeToPixmapForAnimation(), QHeaderView::resizeSection(), QExpandingLineEdit::resizeToContents(), QHeaderViewPrivate::sectionHandleAt(), QLineEdit::selectionStart(), QMainWindowLayout::separatorMove(), setDisabled(), QComboBox::setModel(), QTabWidget::setTabPosition(), setWindowFlags(), QToolTip::showText(), QMainWindowLayout::startSeparatorMove(), QWorkspace::tile(), QTreeView::timerEvent(), QPlainTextEdit::timerEvent(), QTextEdit::timerEvent(), QETWidget::translateMouseEvent(), QMenuBarPrivate::updateGeometries(), QTabWidgetPrivate::updateTabBarPosition(), QSpinBox::valueFromText(), QDoubleSpinBox::valueFromText(), QAbstractItemView::viewportEvent(), and QComboBoxPrivate::~QComboBoxPrivate().
QWidget * QWidget::previousInFocusChain | ( | ) | const |
The previousInFocusChain function returns the previous widget in this widget's focus chain.
Definition at line 6889 of file qwidget.cpp.
|
protectedvirtual |
This special event handler can be reimplemented in a subclass to receive native Qt for Embedded Linux events which are passed in the event parameter.
In your reimplementation of this function, if you want to stop the event being handled by Qt, return true. If you return false, this native event is passed back to Qt, which translates the event into a Qt event and sends it to the widget.
Definition at line 9993 of file qwidget.cpp.
Referenced by QApplication::qwsProcessEvent(), and setShown().
|
slot |
Raises this widget to the top of the parent widget's stack.
After this call the widget will be visually in front of any overlapping sibling widgets.
Definition at line 11901 of file qwidget.cpp.
Referenced by QCalendarWidgetPrivate::_q_yearClicked(), QMessageBox::about(), QMessageBox::aboutQt(), QAxServerBase::ActiveXProc(), QWidgetPrivate::createWinId(), effectiveState(), QApplicationPrivate::globalEventProcessor(), QMdiAreaPrivate::internalRaise(), QWorkspaceChild::internalRaise(), qt_try_modal(), QApplication::qwsProcessEvent(), QStackedLayout::setCurrentIndex(), QToolBarLayout::setExpanded(), QMdiSubWindowPrivate::setSizeGrip(), QComboBox::showPopup(), QMdiAreaPrivate::showRubberBandFor(), QDockAreaLayoutInfo::updateSeparatorWidgets(), QDockAreaLayout::updateSeparatorWidgets(), and QApplication::x11ClientMessage().
|
inline |
Referenced by QMenuPrivate::actionAt(), QLineEditPrivate::adjustedControlRect(), QPushButtonPrivate::adjustedMenuPosition(), QDialog::adjustPosition(), QWorkspaceChild::adjustToFullscreen(), QDesktopWidget::availableGeometry(), QTreeViewPrivate::beginAnimatedOperation(), QMenuBarPrivate::calcActionRects(), QDialog::contextMenuEvent(), QAbstractItemViewPrivate::draggablePaintPairs(), QListViewPrivate::draggablePaintPairs(), QAbstractItemView::dragMoveEvent(), QGroupBox::event(), QTipLabel::eventFilter(), QComboBoxPrivateContainer::eventFilter(), QScriptEdit::extraAreaPaintEvent(), QAbstractItemViewPrivate::fetchMore(), fillRegion(), QSystemTrayIconSys::findIconGeometry(), QAxClientSite::GetIDsOfNames(), QMenuBar::heightForWidth(), QAbstractButton::hitButton(), QAbstractItemView::horizontalScrollbarValueChanged(), QListViewPrivate::horizontalScrollToValue(), QListView::indexAt(), QDesktopWidgetPrivate::init(), QMenuBar::initStyleOption(), QMenu::initStyleOption(), QGraphicsView::invalidateScene(), QWidgetPrivate::isOverlapped(), QTreeViewPrivate::itemDecorationRect(), QAbstractItemView::keyPressEvent(), QMenuBar::minimumSizeHint(), QAbstractSpinBox::minimumSizeHint(), QScrollBar::mouseMoveEvent(), QCheckBox::mouseMoveEvent(), QTipLabel::mouseMoveEvent(), QListView::mouseMoveEvent(), QMenu::mouseMoveEvent(), QComboBoxPrivateScroller::mouseMoveEvent(), QWorkspaceTitleBar::mouseMoveEvent(), QWhatsThat::mousePressEvent(), QMenu::mousePressEvent(), QCalendarPopup::mousePressEvent(), QWorkspaceTitleBar::mousePressEvent(), QAbstractItemView::mousePressEvent(), mousePressEvent(), QmlJSDebugger::ZoomTool::mouseReleaseEvent(), QWhatsThat::mouseReleaseEvent(), QLineEdit::mouseReleaseEvent(), QPlainTextEdit::mouseReleaseEvent(), QWorkspaceTitleBar::mouseReleaseEvent(), QTextEdit::mouseReleaseEvent(), QListView::moveCursor(), QAbstractButtonPrivate::moveFocus(), QComboBoxDelegate::paint(), QCalendarDelegate::paint(), QWellArray::paintCell(), QCalendarDelegate::paintCell(), QFocusFrame::paintEvent(), QVistaBackButton::paintEvent(), QBalloonTip::paintEvent(), QMdiSubWindow::paintEvent(), QMenuBar::paintEvent(), QWellArray::paintEvent(), QSystemTrayIconSys::paintEvent(), QWhatsThat::paintEvent(), QMenu::paintEvent(), QComboBoxPrivateScroller::paintEvent(), QTabBar::paintEvent(), QLineEdit::paintEvent(), QGraphicsView::paintEvent(), QWorkspaceChild::paintEvent(), QGLOverlayWidget::paintGL(), QHeaderView::paintSection(), QToolButtonPrivate::popupTimerDone(), QAbstractItemViewPrivate::position(), QTreeViewPrivate::prepareAnimatedOperation(), QCalendarDelegate::QCalendarDelegate(), QApplication::qwsProcessEvent(), raise(), QAccessibleMenuItem::rect(), QAccessibleItemView::rect(), QAccessibleDial::rect(), QAccessibleComboBox::rect(), QAccessibleDockWidget::rect(), QWidgetPrivate::render_helper(), repaint(), QWSEmbedWidget::resizeEvent(), QDeclarativeView::resizeEvent(), QDialog::resizeEvent(), QAxHostWidget::resizeObject(), QmlJSDebugger::ZoomTool::scaleView(), QDesktopWidget::screenGeometry(), scroll(), QListView::scrollTo(), QTreeView::scrollTo(), QmlJSDebugger::SubcomponentMaskLayerItem::setCurrentItem(), QMenuPrivate::setFirstActionActive(), QFrame::setFrameRect(), setGeometry(), setGraphicsEffect(), setMask(), QGraphicsView::setSceneRect(), QDialog::setSizeGripEnabled(), QTipLabel::setTipRect(), QHeaderViewPrivate::setupSectionIndicator(), QWSEmbedWidget::showEvent(), QMenuBar::sizeHint(), QAbstractSpinBox::sizeHint(), QMenu::sizeHint(), QDateTimeEdit::sizeHint(), QAbstractItemView::startDrag(), QAccessibleTable2Cell::state(), QTabBar::tabRect(), QTableView::timerEvent(), QTreeView::timerEvent(), QTipLabel::tipChanged(), QVistaHelper::topPadding(), QAbstractItemView::update(), update(), QMenuPrivate::updateActionRects(), QScriptEdit::updateExtraArea(), QMenuBarPrivate::updateGeometries(), QWorkspaceChild::updateMask(), QGraphicsView::updateScene(), QGraphicsView::updateSceneRect(), QAbstractItemView::verticalScrollbarValueChanged(), QListViewPrivate::verticalScrollToValue(), QTreeView::viewportEvent(), QColumnView::visualRect(), QListView::visualRegionForSelection(), QMenu::wheelEvent(), and QApplication::x11ProcessEvent().
|
virtual |
Releases the HDC hdc acquired by a previous call to getDC().
Reimplemented from QPaintDevice.
Definition at line 11862 of file qwidget.cpp.
Referenced by QRasterWindowSurface::flush(), and showYellowThing_win().
void QWidget::releaseKeyboard | ( | ) |
Releases the keyboard grab.
Definition at line 3347 of file qwidget_mac.mm.
Referenced by QWidgetResizeHandler::eventFilter(), grabKeyboard(), isServerProcess(), QWidgetResizeHandler::keyPressEvent(), qstring_to_xtp(), and qt_grab_cursor().
void QWidget::releaseMouse | ( | ) |
Releases the mouse grab.
Definition at line 3330 of file qwidget_mac.mm.
Referenced by QWidgetResizeHandler::eventFilter(), grabMouse(), isServerProcess(), QWidgetResizeHandler::keyPressEvent(), QVistaHelper::mouseReleaseEvent(), qJournalRecordProc(), qstring_to_xtp(), and qt_grab_cursor().
void QWidget::releaseShortcut | ( | int | id | ) |
Removes the shortcut with the given id from Qt's shortcut system.
The widget will no longer receive QEvent::Shortcut events for the shortcut's key sequence (unless it has other shortcuts with the same key sequence).
Definition at line 11771 of file qwidget.cpp.
Referenced by QTabBar::removeTab(), QLabel::setBuddy(), QAbstractButton::setShortcut(), QTabBar::setTabText(), and QGroupBox::setTitle().
void QWidget::removeAction | ( | QAction * | action | ) |
Removes the action action from this widget's list of actions.
Definition at line 3386 of file qwidget.cpp.
Referenced by QMenuBar::clear(), QToolBar::clear(), QMenu::clear(), QAbstractSpinBox::contextMenuEvent(), QDialogButtonBox::event(), QAbstractItemView::focusOutEvent(), insertAction(), QAbstractItemView::keyPressEvent(), QPushButton::setMenu(), QToolButton::setMenu(), QTornOffMenu::syncWithMenu(), QToolBarLayout::takeAt(), and QAction::~QAction().
void QWidget::render | ( | QPaintDevice * | target, |
const QPoint & | targetOffset = QPoint() , |
||
const QRegion & | sourceRegion = QRegion() , |
||
RenderFlags | renderFlags = RenderFlags(DrawWindowBackground | DrawChildren) |
||
) |
Renders the sourceRegion of this widget into the target using renderFlags to determine how to render.
Rendering starts at targetOffset in the target. For example:
If sourceRegion is a null region, this function will use QWidget::rect() as the region, i.e. the entire widget.
Ensure that you call QPainter::end() for the target device's active painter (if any) before rendering. For example:
Definition at line 5372 of file qwidget.cpp.
Referenced by QPixmap::grabWidget(), render(), and QTreeViewPrivate::renderTreeToPixmapForAnimation().
void QWidget::render | ( | QPainter * | painter, |
const QPoint & | targetOffset = QPoint() , |
||
const QRegion & | sourceRegion = QRegion() , |
||
RenderFlags | renderFlags = RenderFlags(DrawWindowBackground | DrawChildren) |
||
) |
Renders the widget into the painter's QPainter::device().
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Transformations and settings applied to the painter will be used when rendering.
Definition at line 5394 of file qwidget.cpp.
|
slot |
Repaints the widget directly by calling paintEvent() immediately, unless updates are disabled or the widget is hidden.
We suggest only using repaint() if you need an immediate repaint, for example during animation. In almost all circumstances update() is better, as it permits Qt to optimize for speed and minimize flicker.
Definition at line 10761 of file qwidget.cpp.
Referenced by QAbstractButton::animateClick(), QColorShowLabel::dropEvent(), QStatusBar::hideOrShow(), QAbstractButton::keyPressEvent(), QScrollBar::mouseMoveEvent(), QAbstractButton::mouseMoveEvent(), QScrollBar::mousePressEvent(), QAbstractButton::mousePressEvent(), QTabBar::mousePressEvent(), qt_event_request_showsheet(), QAlphaWidget::render(), QSplashScreen::repaint(), repaint(), QProgressBar::reset(), QRollEffect::scroll(), QProgressBar::setAlignment(), QColorPicker::setCol(), QColorLuminancePicker::setCol(), setDisabledStyle(), QProgressBar::setTextVisible(), QColorLuminancePicker::setVal(), QProgressBar::setValue(), QColorShower::showCurrentColor(), and QToolButton::showMenu().
void QWidget::repaint | ( | int | x, |
int | y, | ||
int | w, | ||
int | h | ||
) |
This version repaints a rectangle (x, y, w, h) inside the widget.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
If w is negative, it is replaced with width() - x
, and if h is negative, it is replaced width height() - y
.
Definition at line 10777 of file qwidget.cpp.
void QWidget::repaint | ( | const QRect & | rect | ) |
This version repaints a rectangle rect inside the widget.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 10797 of file qwidget.cpp.
void QWidget::repaint | ( | const QRegion & | rgn | ) |
This version repaints a region rgn inside the widget.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 10835 of file qwidget.cpp.
|
protected |
This function can be called on the widget that currently has focus to reset the input method operating on it.
This function is providing for convenience, instead you should use QInputContext::reset() on the input context that was returned by inputContext().
Definition at line 522 of file qwidget.cpp.
Referenced by QLineEdit::clear(), event(), QLineEdit::redo(), setShown(), and QLineEdit::undo().
|
inline |
This corresponds to resize(QSize(w, h)).
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 1014 of file qwidget.h.
Referenced by QMenu::actionEvent(), QAxClientSite::activateObject(), QMenuPrivate::QMacMenuPrivate::addAction(), adjustSize(), QMdiAreaPrivate::appendChild(), QMenuBar::changeEvent(), QMenu::changeEvent(), QWorkspaceChild::changeEvent(), CloseButton::CloseButton(), QMdiSubWindow::event(), QWorkspaceChild::eventFilter(), QWorkspaceChild::iconWidget(), QColumnViewGrip::moveGrip(), QtWndProc(), QWhatsThat::QWhatsThat(), qWinProcessConfigRequests(), QWorkspaceChild::QWorkspaceChild(), QRubberBand::resize(), QColumnViewPreviewColumn::resizeEvent(), QMdiArea::resizeEvent(), QWorkspaceChild::resizeEvent(), QExpandingLineEdit::resizeToContents(), QMdiAreaPrivate::resizeToMinimumTileSize(), restoreGeometry(), QDockAreaLayoutInfo::restoreState(), QTipLabel::reuseTip(), QAlphaWidget::run(), QRollEffect::run(), QRollEffect::scroll(), QProgressDialog::setBar(), QProgressDialog::setCancelButton(), QProgressDialog::setCancelButtonText(), setFixedSize(), QProgressDialog::setLabel(), QProgressDialog::setLabelText(), setMaximumSize(), setMinimumSize(), QSplashScreen::setPixmap(), QShapedPixmapWidget::setPixmap(), QDeclarativeView::setRootObject(), QMenu::setTearOffEnabled(), QProgressDialog::setValue(), QScrollArea::setWidget(), QGLGlobalShareWidget::shareWidget(), QMdiSubWindow::showEvent(), QProgressDialog::showEvent(), QMdiArea::showEvent(), QDialog::showExtension(), QMdiSubWindow::showShaded(), QWorkspaceChild::showShaded(), and QScrollAreaPrivate::updateScrollBars().
void QWidget::resize | ( | const QSize & | s | ) |
Definition at line 7200 of file qwidget.cpp.
|
protectedvirtual |
This event handler can be reimplemented in a subclass to receive widget resize events which are passed in the event parameter.
When resizeEvent() is called, the widget already has its new geometry. The old size is accessible through QResizeEvent::oldSize().
The widget will be erased and receive a paint event immediately after processing the resize event. No drawing need be (or should be) done inside this handler.
Reimplemented in QWorkspaceChild, QColorPicker, QGLWidget, QAbstractItemView, QMessageBox, QTextEdit, QGraphicsView, QComboBoxPrivateContainer, QComboBox, QPlainTextEdit, QWizard, QTabBar, QSplitterHandle, QSystemTrayIconSys, QTabWidget, QListView, QMdiArea, QCalendarWidget, QToolBar, QTipLabel, QMenuBar, QAbstractSpinBox, QAxHostWidget, QProgressDialog, QMdiSubWindow, QSplitter, QX11EmbedContainer, QDialog, QBalloonTip, QWorkspace, QDeclarativeView, QAbstractScrollArea, QStatusBar, QColumnView, QGroupBox, QScriptEdit, QDesktopWidget, QComboBoxListView, QDial, QAxWidget, QScrollArea, QRubberBand, QColumnViewPreviewColumn, QX11EmbedWidget, and QWSEmbedWidget.
Definition at line 9587 of file qwidget.cpp.
Referenced by QComboBox::addItems(), QDesktopWidget::availableGeometry(), QGLWidget::event(), event(), QDesktopWidgetPrivate::init(), QToolBar::isAreaAllowed(), QCalendarWidget::isNavigationBarVisible(), QRubberBand::resize(), QX11EmbedWidget::resizeEvent(), QDial::resizeEvent(), QGroupBox::resizeEvent(), QStatusBar::resizeEvent(), QBalloonTip::resizeEvent(), QMdiSubWindow::resizeEvent(), QAbstractSpinBox::resizeEvent(), QTipLabel::resizeEvent(), QToolBar::resizeEvent(), QCalendarWidget::resizeEvent(), QTabWidget::resizeEvent(), QSystemTrayIconSys::resizeEvent(), QSplitterHandle::resizeEvent(), QComboBoxPrivateContainer::resizeEvent(), QColorPicker::resizeEvent(), and setShown().
bool QWidget::restoreGeometry | ( | const QByteArray & | geometry | ) |
Restores the geometry and state top-level widgets stored in the byte array geometry.
Returns true on success; otherwise returns false.
If the restored geometry is off-screen, it will be modified to be inside the available screen geometry.
To restore geometry saved using QSettings, you can use code like this:
See the Window Geometry documentation for an overview of geometry issues with windows.
Use QMainWindow::restoreState() to restore the geometry and the state of toolbars and dock widgets.
Definition at line 7313 of file qwidget.cpp.
Referenced by QScriptEngineDebugger::standardWindow().
QByteArray QWidget::saveGeometry | ( | ) | const |
Saves the current geometry and state for top-level widgets.
To save the geometry when the window closes, you can implement a close event like this:
See the Window Geometry documentation for an overview of geometry issues with windows.
Use QMainWindow::saveState() to save the geometry and the state of toolbars and dock widgets.
Definition at line 7251 of file qwidget.cpp.
void QWidget::scroll | ( | int | dx, |
int | dy | ||
) |
Scrolls the widget including its children dx pixels to the right and dy downward.
Both dx and dy may be negative.
After scrolling, the widgets will receive paint events for the areas that need to be repainted. For widgets that Qt knows to be opaque, this is only the newly exposed parts. For example, if an opaque widget is scrolled 8 pixels to the left, only an 8-pixel wide stripe at the right edge needs updating.
Since widgets propagate the contents of their parents by default, you need to set the autoFillBackground property, or use setAttribute() to set the Qt::WA_OpaquePaintEvent attribute, to make a widget opaque.
For widgets that use contents propagation, a scroll will cause an update of the entire scroll area.
Definition at line 10684 of file qwidget.cpp.
Referenced by QMdiArea::scrollContentsBy(), QGraphicsView::scrollContentsBy(), and QScriptEdit::updateExtraArea().
void QWidget::scroll | ( | int | dx, |
int | dy, | ||
const QRect & | r | ||
) |
This version only scrolls r and does not move the children of the widget.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
If r is empty or invalid, the result is undefined.
Definition at line 10721 of file qwidget.cpp.
void QWidget::setAcceptDrops | ( | bool | on | ) |
Definition at line 3534 of file qwidget.cpp.
Referenced by QColorShowLabel::QColorShowLabel(), QGraphicsView::QGraphicsView(), QX11EmbedContainer::QX11EmbedContainer(), QAbstractItemView::setDragDropMode(), QGraphicsView::setupViewport(), and QListView::setViewMode().
void QWidget::setAccessibleDescription | ( | const QString & | description | ) |
Definition at line 11709 of file qwidget.cpp.
void QWidget::setAccessibleName | ( | const QString & | name | ) |
Definition at line 11684 of file qwidget.cpp.
void QWidget::setAttribute | ( | Qt::WidgetAttribute | attribute, |
bool | on = true |
||
) |
Sets the attribute attribute on this widget if on is true; otherwise clears the attribute.
Definition at line 11087 of file qwidget.cpp.
Referenced by QGroupBoxPrivate::_q_setChildrenEnabled(), QMessageBox::about(), QMessageBox::aboutQt(), QMenu::actionEvent(), QWidgetPrivate::activateChildLayoutsRecursively(), QMenuPrivate::QMacMenuPrivate::addAction(), QLayout::addChildWidget(), QMdiArea::addSubWindow(), QGroupBox::childEvent(), QMessageBoxDetailsText::TextEdit::contextMenuEvent(), QLabel::contextMenuEvent(), QTextControlPrivate::contextMenuEvent(), QMainWindow::contextMenuEvent(), create(), QToolBarLayout::createItem(), PvrEglScreenSurfaceFunctions::createNativeWindow(), QWidgetPrivate::createWinId(), destroy(), do_size_hints(), QGraphicsScenePrivate::enableTouchEventsOnViews(), QDialog::event(), QMdiSubWindow::event(), QAbstractButton::event(), QLabel::event(), event(), QSizeGrip::eventFilter(), QDialog::exec(), QAbstractItemView::focusInEvent(), QApplicationPrivate::focusNextPrevChild_helper(), QMainWindowLayout::getSeparatorWidget(), grabShortcut(), QWidgetPrivate::hideChildren(), QStatusBar::hideOrShow(), QColumnView::initializeColumn(), make_widget_eventUPP(), QCalendarWidget::mousePressEvent(), QMenu::mousePressEvent(), QCalendarPopup::mousePressEvent(), QComboBoxPrivateContainer::mousePressEvent(), move(), nativeParentWidget(), QApplication::notify(), QApplicationPrivate::notify_helper(), QDialog::open(), QGtkStylePrivate::openDirectory(), QGtkStylePrivate::openFilename(), QGtkStylePrivate::openFilenames(), QPrintDialogPrivate::openWindowsPrintDialogModally(), QWindowsXPStyle::polish(), QMacStyle::polish(), QWindowsVistaStyle::polish(), QPlastiqueStyle::polish(), QCleanlooksStyle::polish(), QStyleSheetStyle::polish(), QGtkStyle::polish(), QMenu::popup(), QAlphaWidget::QAlphaWidget(), QAxHostWidget::QAxHostWidget(), QBalloonTip::QBalloonTip(), QCalendarPopup::QCalendarPopup(), QColorPicker::QColorPicker(), QComboBoxPrivateContainer::QComboBoxPrivateContainer(), QComboBoxPrivateScroller::QComboBoxPrivateScroller(), QDesktopWidget::QDesktopWidget(), QDialog::QDialog(), QFocusFrame::QFocusFrame(), QGLOverlayWidget::QGLOverlayWidget(), QGraphicsView::QGraphicsView(), QListView::QListView(), QMacCocoaViewContainer::QMacCocoaViewContainer(), QMacNativeWidget::QMacNativeWidget(), QMdiSubWindow::QMdiSubWindow(), QPageSetupWidget::QPageSetupWidget(), qPRCleanup(), qPRCreate(), QRollEffect::QRollEffect(), QRubberBand::QRubberBand(), QShapedPixmapWidget::QShapedPixmapWidget(), qt_mac_unregister_widget(), qt_win_get_existing_directory(), qt_win_get_open_file_name(), qt_win_get_open_file_names(), qt_win_get_save_file_name(), QTornOffMenu::QTornOffMenu(), QWhatsThat::QWhatsThat(), QWorkspaceChild::QWorkspaceChild(), QX11EmbedContainer::QX11EmbedContainer(), QX11EmbedWidget::QX11EmbedWidget(), QAlphaWidget::render(), resize(), QSplitterHandle::resizeEvent(), QAlphaWidget::run(), QRollEffect::run(), QGtkStylePrivate::saveFilename(), QRollEffect::scroll(), setAcceptDrops(), setAttribute(), QWorkspace::setBackground(), QDateTimeEdit::setCalendarPopup(), setContentsMargins(), setCursor(), QComboBox::setEditable(), setEnabled(), QDockWidget::setFloating(), QMacStyle::setFocusRectPolicy(), QApplicationPrivate::setFocusWidget(), setFont(), QFrame::setFrameStyle(), setGeometry(), QComboBoxPrivateContainer::setItemView(), setLayoutDirection(), QComboBox::setLineEdit(), setLocale(), setMaximumSize(), setMinimumSize(), QDialog::setModal(), QSplitter::setOrientation(), QProgressBar::setOrientation(), QAbstractSlider::setOrientation(), setPalette(), setParent(), QWidgetPrivate::setParent_sys(), QSplashScreen::setPixmap(), QPlainTextEdit::setReadOnly(), QLineEdit::setReadOnly(), QTextEdit::setReadOnly(), QDeclarativeView::setRootObject(), setSizePolicy(), setStyle(), setUpdatesEnabled(), QMdiArea::setupViewport(), QGraphicsView::setupViewport(), QDialog::setVisible(), QColorDialog::setVisible(), QFontDialog::setVisible(), setVisible(), QMdiSubWindow::setWidget(), QGraphicsProxyWidgetPrivate::setWidget_helper(), QMacStyle::setWidgetSizePolicy(), setWindowIcon(), setWindowModality(), setWindowModified(), setWindowOpacity(), QWidgetPrivate::showChildren(), QDialog::showEvent(), QWidgetBackingStore::showYellowThing(), QSystemTrayIconSys::sysTrayTracker(), QAxServerBase::TranslateAcceleratorW(), QApplicationPrivate::translateRawTouchEvent(), QStatusBarPrivate::tryToShowSizeGrip(), QWindowsXPStyle::unpolish(), QMacStyle::unpolish(), QWindowsVistaStyle::unpolish(), QPlastiqueStyle::unpolish(), QCleanlooksStyle::unpolish(), QStyleSheetStyle::unpolish(), unsetCursor(), unsetLayoutDirection(), unsetLocale(), winId(), and QApplication::x11ProcessEvent().
void QWidget::setAutoFillBackground | ( | bool | enabled | ) |
Definition at line 631 of file qwidget.cpp.
Referenced by QWorkspace::addWindow(), QCalendarWidgetPrivate::createNavigationBar(), QMainWindowLayout::getSeparatorWidget(), QStyleSheetStyle::polish(), QCalendarWidget::QCalendarWidget(), QMdiSubWindow::QMdiSubWindow(), QWorkspaceChild::QWorkspaceChild(), QWizardPrivate::recreateLayout(), QGraphicsView::setupViewport(), and QStyleSheetStyle::unsetPalette().
void QWidget::setBackgroundRole | ( | QPalette::ColorRole | role | ) |
Sets the background role of the widget to role.
The background role defines the brush from the widget's palette that is used to render the background.
If role is QPalette::NoRole, then the widget inherits its parent's background role.
Note that styles are free to choose any color from the palette. You can modify the palette or set a style sheet if you don't achieve the result you want with setBackgroundRole().
Definition at line 4708 of file qwidget.cpp.
Referenced by QCalendarWidgetPrivate::createNavigationBar(), QTextEditPrivate::init(), QAbstractItemViewPrivate::init(), QPlainTextEditPrivate::init(), nativeParentWidget(), QToolBoxButton::paintEvent(), QPlastiqueStyle::polish(), QCalendarWidget::QCalendarWidget(), QGraphicsView::QGraphicsView(), QMdiSubWindow::QMdiSubWindow(), QTipLabel::QTipLabel(), QToolBox::QToolBox(), QToolBoxButton::QToolBoxButton(), QWizardHeader::QWizardHeader(), QWorkspaceChild::QWorkspaceChild(), QWizardPrivate::recreateLayout(), QPlastiqueStyle::unpolish(), and QToolBoxPrivate::updateTabs().
|
inline |
void QWidget::setBaseSize | ( | int | basew, |
int | baseh | ||
) |
This corresponds to setBaseSize(QSize(basew, baseh)).
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Sets the widgets base size to width basew and height baseh.
Definition at line 4256 of file qwidget.cpp.
void QWidget::setContentsMargins | ( | int | left, |
int | top, | ||
int | right, | ||
int | bottom | ||
) |
Sets the margins around the contents of the widget to have the sizes left, top, right, and bottom.
The margins are used by the layout system, and may be used by subclasses to specify the area to draw in (e.g. excluding the frame).
Changing the margins will trigger a resizeEvent().
Definition at line 7449 of file qwidget.cpp.
Referenced by QBalloonTip::balloon(), QMdiSubWindow::event(), QWindowsVistaStyle::polish(), QWorkspaceChild::QWorkspaceChild(), QWizardPrivate::recreateLayout(), QSplitterHandle::resizeEvent(), setContentsMargins(), QFrame::setFrameRect(), QMessageBox::setInformativeText(), and QWindowsVistaStyle::unpolish().
void QWidget::setContentsMargins | ( | const QMargins & | margins | ) |
The setContentsMargins function sets the margins around the widget's contents.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Sets the margins around the contents of the widget to have the sizes determined by margins. The margins are used by the layout system, and may be used by subclasses to specify the area to draw in (e.g. excluding the frame).
Changing the margins will trigger a resizeEvent().
Definition at line 7497 of file qwidget.cpp.
void QWidget::setContextMenuPolicy | ( | Qt::ContextMenuPolicy | policy | ) |
Definition at line 7596 of file qwidget.cpp.
Referenced by QFileDialogPrivate::createWidgets(), QSidebar::init(), QFileDialogListView::init(), and QFileDialogTreeView::init().
void QWidget::setCursor | ( | const QCursor & | cursor | ) |
Definition at line 5290 of file qwidget.cpp.
Referenced by QTextBrowserPrivate::_q_activateAnchor(), QTextBrowserPrivate::_q_highlightLink(), QGraphicsViewPrivate::_q_setViewportCursor(), QGraphicsViewPrivate::_q_unsetViewportCursor(), QmlJSDebugger::ColorPickerTool::clear(), QmlJSDebugger::ZoomTool::clear(), QmlJSDebugger::LiveSelectionTool::clear(), CloseButton::CloseButton(), QToolBar::event(), QScriptEdit::extraAreaMouseEvent(), QTextBrowserPrivate::init(), QTextEditPrivate::init(), QPlainTextEditPrivate::init(), QWorkspaceChild::leaveEvent(), QHeaderView::mouseDoubleClickEvent(), QWhatsThat::mouseMoveEvent(), QHeaderView::mouseMoveEvent(), QGraphicsViewPrivate::mouseMoveEventHandler(), QGraphicsView::mousePressEvent(), QGraphicsView::mouseReleaseEvent(), QSizeGrip::moveEvent(), QColumnViewGrip::QColumnViewGrip(), QWhatsThat::QWhatsThat(), QProgressDialog::reset(), QGraphicsView::setDragMode(), QVistaHelper::setMouseCursor(), QWidgetResizeHandler::setMouseCursor(), QSplitterHandle::setOrientation(), and QLineEdit::setReadOnly().
|
slot |
Disables widget input events if disable is true; otherwise enables input events.
See the enabled documentation for more information.
Definition at line 3589 of file qwidget.cpp.
|
slot |
Definition at line 3447 of file qwidget.cpp.
Referenced by QInputDialogPrivate::_q_currentRowChanged(), QPrintDialogPrivate::_q_printerOrFileSelected(), QPrintDialogPrivate::_q_printRangeSelected(), QGroupBoxPrivate::_q_setChildrenEnabled(), QScriptDebuggerCodeFinderWidgetPrivate::_q_updateButtons(), QFileDialogPrivate::_q_updateOkButton(), QX11EmbedContainerPrivate::acceptClient(), QGroupBox::childEvent(), QX11EmbedContainer::eventFilter(), QScriptDebuggerPrivate::handleResponse(), QToolBarLayout::layoutActions(), QTabBarPrivate::layoutTabs(), QTabBarPrivate::makeVisible(), QScriptNewBreakpointWidget::onTextChanged(), QAlphaWidget::QAlphaWidget(), QRollEffect::QRollEffect(), QScriptNewBreakpointWidget::QScriptNewBreakpointWidget(), QTornOffMenu::QTornOffMenu(), QX11EmbedContainer::QX11EmbedContainer(), QAlphaWidget::render(), QAlphaWidget::run(), QRollEffect::run(), QRollEffect::scroll(), QToolButton::setDefaultAction(), setDisabled(), QInputDialogPrivate::setInputWidget(), QToolBox::setItemEnabled(), QPrintDialogPrivate::setPrinter(), QTabWidget::setTabEnabled(), QCalendarWidgetPrivate::updateMonthMenu(), and QX11EmbedContainer::x11Event().
void QWidget::setFixedHeight | ( | int | h | ) |
Sets both the minimum and maximum heights of the widget to h without changing the widths.
Provided for convenience.
Definition at line 4388 of file qwidget.cpp.
Referenced by QMessageBoxDetailsText::QMessageBoxDetailsText(), and QAxClientSite::qt_metacall().
void QWidget::setFixedSize | ( | const QSize & | s | ) |
Sets both the minimum and maximum sizes of the widget to s, thereby preventing it from ever growing or shrinking.
This will override the default size constraints set by QLayout.
To remove constraints, set the size to QWIDGETSIZE_MAX.
Alternatively, if you want the widget to have a fixed size based on its contents, you can call QLayout::setSizeConstraint(QLayout::SetFixedSize);
Definition at line 4284 of file qwidget.cpp.
Referenced by QTornOffMenu::actionEvent(), QLayout::activate(), QLayout::addChildWidget(), QMdi::ControlLabel::ControlLabel(), QDialogButtonBox::event(), QMessageBoxPrivate::hideSpecial(), QBalloonTip::QBalloonTip(), QMdiSubWindowPrivate::setSizeGrip(), QWizardHeader::setup(), and QDialog::showExtension().
void QWidget::setFixedSize | ( | int | w, |
int | h | ||
) |
Sets the width of the widget to w and the height to h.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 4300 of file qwidget.cpp.
void QWidget::setFixedWidth | ( | int | w | ) |
Sets both the minimum and maximum width of the widget to w without changing the heights.
Provided for convenience.
Definition at line 4368 of file qwidget.cpp.
Referenced by QFontComboBox::event(), and QAxClientSite::qt_metacall().
|
inlineslot |
Gives the keyboard input focus to this widget (or its focus proxy) if this widget or one of its parents is the active window.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 432 of file qwidget.h.
Referenced by QColumnViewPrivate::_q_changeCurrentColumn(), QScriptDebuggerPrivate::_q_findInScript(), QGroupBoxPrivate::_q_fixFocus(), QPrintDialogPrivate::_q_printerOrFileSelected(), QCalendarWidgetPrivate::_q_yearClicked(), QAxServerBase::ActiveXProc(), QGraphicsScenePrivate::addPopup(), QMdiArea::addSubWindow(), QAbstractButton::animateClick(), QAbstractItemView::closeEditor(), QApplicationPrivate::closePopup(), QAccessibleWidget::doAction(), QColorWell::dragLeaveEvent(), QGroupBox::event(), QAbstractButton::event(), QLabel::event(), QStyledItemDelegate::eventFilter(), QItemDelegate::eventFilter(), QCalendarWidget::eventFilter(), QMenu::focusNextPrevChild(), focusNextPrevChild(), QWidgetPrivate::frameStrut(), QApplicationPrivate::giveFocusAccordingToFocusPolicy(), QMenu::keyPressEvent(), QFileDialogLineEdit::keyPressEvent(), QAbstractItemView::keyPressEvent(), QMdiSubWindowPrivate::leaveInteractiveMode(), make_widget_eventUPP(), QCalendarWidget::mousePressEvent(), QAbstractButtonPrivate::moveFocus(), QAbstractItemViewPrivate::openEditor(), QApplicationPrivate::openPopup(), qt_try_modal(), QApplication::qwsProcessEvent(), QAlphaWidget::render(), resetInputContext(), QMdiSubWindowPrivate::restoreFocus(), QRollEffect::scroll(), QWorkspaceChild::setActive(), QApplication::setActiveWindow(), setAttribute(), QCalendarPopup::setCalendarWidget(), QMenuBarPrivate::setCurrentAction(), QMenuPrivate::setCurrentAction(), QStackedLayout::setCurrentIndex(), QMessageBox::setDefaultButton(), setFocus(), QMdiSubWindowPrivate::setFocusWidget(), QWidgetPrivate::show_helper(), QComboBox::showPopup(), QWizardPrivate::switchToPage(), and QX11EmbedContainer::x11Event().
void QWidget::setFocus | ( | Qt::FocusReason | reason | ) |
Gives the keyboard input focus to this widget (or its focus proxy) if this widget or one of its parents is the active window.
The reason argument will be passed into any focus event sent from this function, it is used to give an explanation of what caused the widget to get focus. If the window is not active, the widget will be given the focus when the window becomes active.
First, a focus out event is sent to the focus widget (if any) to tell it that it is about to lose the focus. Then a focus in event is sent to this widget to tell it that it just received the focus. (Nothing happens if the focus in and focus out widgets are the same.)
setFocus() gives focus to a widget regardless of its focus policy, but does not clear any keyboard grab (see grabKeyboard()).
Be aware that if the widget is hidden, it will not accept focus until it is shown.
Definition at line 6633 of file qwidget.cpp.
void QWidget::setFocusPolicy | ( | Qt::FocusPolicy | policy | ) |
Definition at line 7631 of file qwidget.cpp.
Referenced by QColumnViewPrivate::_q_changeCurrentColumn(), QAxClientSite::activateObject(), QAxWidget::clear(), CloseButton::CloseButton(), QMdi::ControlLabel::ControlLabel(), QMdi::ControllerWidget::ControllerWidget(), QColumnViewPrivate::createColumn(), QToolBarLayout::createItem(), QCalendarWidgetPrivate::createNavigationBar(), QAbstractButtonPrivate::fixFocusPolicy(), QTabBarPrivate::init(), QHeaderView::initialize(), QCalendarWidget::QCalendarWidget(), QDockWidgetTitleButton::QDockWidgetTitleButton(), QFocusFrame::QFocusFrame(), QMdiArea::QMdiArea(), QMDIControl::QMDIControl(), QMdiSubWindow::QMdiSubWindow(), QMessageBoxDetailsText::QMessageBoxDetailsText(), QToolBarLayout::QToolBarLayout(), QToolBoxButton::QToolBoxButton(), QVistaBackButton::QVistaBackButton(), QWellArray::QWellArray(), QWhatsThat::QWhatsThat(), QX11EmbedContainer::QX11EmbedContainer(), QX11EmbedWidget::QX11EmbedWidget(), QGroupBox::setCheckable(), QCompleter::setPopup(), QLabel::setTextInteractionFlags(), and QGraphicsView::setupViewport().
void QWidget::setFocusProxy | ( | QWidget * | w | ) |
Sets the widget's focus proxy to widget w.
If w is 0, the function resets this widget to have no focus proxy.
Some widgets can "have focus", but create a child widget, such as QLineEdit, to actually handle the focus. In this case, the widget can set the line edit to be its focus proxy.
setFocusProxy() sets the widget which will actually get focus when "this widget" gets it. If there is a focus proxy, setFocus() and hasFocus() operate on the focus proxy.
Definition at line 6537 of file qwidget.cpp.
Referenced by QAxClientSite::activateObject(), QDialogButtonBoxPrivate::layoutButtons(), QCalendarWidget::QCalendarWidget(), QScriptDebuggerCodeFinderWidget::QScriptDebuggerCodeFinderWidget(), QScriptNewBreakpointWidget::QScriptNewBreakpointWidget(), QCompleter::setPopup(), and QTabWidget::setTabBar().
void QWidget::setFont | ( | const QFont & | font | ) |
Use the single-argument overload instead.
Definition at line 4996 of file qwidget.cpp.
Referenced by QCalendarWidgetPrivate::createNavigationBar(), QListWidgetItem::font(), QMacStyle::polish(), QWindowsVistaStyle::polish(), QBalloonTip::QBalloonTip(), QWizardHeader::QWizardHeader(), QWizardPrivate::recreateLayout(), QToolButton::setDefaultAction(), QMessageBox::setInformativeText(), QWindowsVistaStyle::unpolish(), QStyleSheetStyle::unsetPalette(), and QTextEdit::zoomIn().
void QWidget::setForegroundRole | ( | QPalette::ColorRole | role | ) |
Sets the foreground role of the widget to role.
The foreground role defines the color from the widget's palette that is used to draw the foreground.
If role is QPalette::NoRole, the widget uses a foreground role that contrasts with the background role.
Note that styles are free to choose any color from the palette. You can modify the palette or set a style sheet if you don't achieve the result you want with setForegroundRole().
Definition at line 4773 of file qwidget.cpp.
Referenced by QTipLabel::QTipLabel().
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.This corresponds to setGeometry(QRect(x, y, w, h)).
Definition at line 1017 of file qwidget.h.
Referenced by QWorkspacePrivate::_q_scrollBarChanged(), QCalendarWidgetPrivate::_q_yearClicked(), QWorkspaceChild::adjustToFullscreen(), QWidgetAnimator::animate(), QApplicationPrivate::applyX11SpecificCommandLineArguments(), QWorkspace::cascade(), QColumnViewPrivate::createColumn(), QColumnViewPrivate::doLayout(), QLayoutPrivate::doResize(), QMenuBar::eventFilter(), fixToolBarOrientation(), QWorkspacePrivate::hideChild(), QProgressDialogPrivate::layout(), QTabBarPrivate::layoutTabs(), make_widget_eventUPP(), QWorkspacePrivate::minimizeWindow(), QMenuPrivate::mouseEventTaken(), QSizeGrip::mouseMoveEvent(), QWidgetResizeHandler::mouseMoveEvent(), QVistaHelper::mouseMoveEvent(), QRubberBand::move(), QVNCIntegration::moveToScreen(), QWorkspacePrivate::normalizeWindow(), parseGeometry(), QMdiAreaPrivate::place(), QWorkspacePrivate::place(), QMenu::popup(), QOpenKODEWindow::QOpenKODEWindow(), qt_mac_widget_in_menu_eventHandler(), qWinProcessConfigRequests(), QMdi::RegularTiler::rearrange(), QMdi::SimpleCascader::rearrange(), QMdi::IconTiler::rearrange(), QRubberBand::resize(), QScriptEdit::resizeEvent(), QWorkspaceChild::resizeEvent(), QBBScreen::resizeNativeWidgetWindow(), QBBScreen::resizeTopLevelWindow(), restoreGeometry(), QSplitterPrivate::setGeo(), QEglFSWindow::setGeometry(), QOpenKODEWindow::setGeometry(), QRubberBand::setGeometry(), QToolBarLayout::setGeometry(), QStackedLayout::setGeometry(), QRasterWindowSurface::setGeometry(), QAbstractItemView::setIndexWidget(), QStackedLayout::setStackingMode(), QCompleterPrivate::showPopup(), QComboBox::showPopup(), QWorkspace::tile(), QMainWindowLayout::toggleToolBarsVisible(), QETWidget::translateEmbedEvent(), QMenuPrivate::updateActionRects(), QDateTimeEditPrivate::updateEditFieldGeometry(), QAbstractSpinBoxPrivate::updateEditFieldGeometry(), QStyledItemDelegate::updateEditorGeometry(), QItemDelegate::updateEditorGeometry(), QUIKitWindow::updateGeometryAndOrientation(), QComboBoxPrivate::updateLineEditGeometry(), QDesktopWidgetPrivate::updateScreenList(), QDockAreaLayoutInfo::updateSeparatorWidgets(), QDockAreaLayout::updateSeparatorWidgets(), and QMdiAreaPrivate::updateTabBarGeometry().
void QWidget::setGeometry | ( | const QRect & | r | ) |
Definition at line 7213 of file qwidget.cpp.
void QWidget::setGraphicsEffect | ( | QGraphicsEffect * | effect | ) |
The setGraphicsEffect function is for setting the widget's graphics effect.
Sets effect as the widget's effect. If there already is an effect installed on this widget, QWidget will delete the existing effect before installing the new effect.
If effect is the installed on a different widget, setGraphicsEffect() will remove the effect from the widget and install it on this widget.
QWidget takes ownership of effect.
Definition at line 5517 of file qwidget.cpp.
|
inlineslot |
Convenience function, equivalent to setVisible(!hidden).
Definition at line 495 of file qwidget.h.
Referenced by QListWidgetItem::listWidget(), QSplitterPrivate::recalc(), and QTreeWidget::setItemHidden().
void QWidget::setInputContext | ( | QInputContext * | context | ) |
This function sets the input context context on this widget.
Qt takes ownership of the given input context.
Definition at line 491 of file qwidget.cpp.
void QWidget::setInputMethodHints | ( | Qt::InputMethodHints | hints | ) |
Definition at line 9736 of file qwidget.cpp.
Referenced by QInputDialog::getText(), QLineEdit::setEchoMode(), setShown(), and QGraphicsViewPrivate::updateInputMethodSensitivity().
void QWidget::setLayout | ( | QLayout * | layout | ) |
Sets the layout manager for this widget to layout.
If there already is a layout manager installed on this widget, QWidget won't let you install another. You must first delete the existing layout manager (returned by layout()) before you can call setLayout() with the new layout.
If layout is the layout manger on a different widget, setLayout() will reparent the layout and make it the layout manager for this widget.
Example:
An alternative to calling this function is to pass this widget to the layout's constructor.
The QWidget will take ownership of layout.
Definition at line 10104 of file qwidget.cpp.
Referenced by QCalendarWidgetPrivate::createNavigationBar(), QPrintPreviewDialogPrivate::init(), QAbstractScrollAreaScrollBarContainer::QAbstractScrollAreaScrollBarContainer(), QBalloonTip::QBalloonTip(), QLayout::QLayout(), QMdiSubWindow::QMdiSubWindow(), QMessageBoxDetailsText::QMessageBoxDetailsText(), and QPrintPropertiesDialog::QPrintPropertiesDialog().
void QWidget::setLayoutDirection | ( | Qt::LayoutDirection | direction | ) |
Definition at line 5199 of file qwidget.cpp.
Referenced by QLineEdit::keyPressEvent(), and QComboBoxPrivate::updateLayoutDirection().
void QWidget::setLocale | ( | const QLocale & | locale | ) |
Definition at line 6152 of file qwidget.cpp.
void QWidget::setMask | ( | const QBitmap & | bitmap | ) |
Causes only the pixels of the widget for which bitmap has a corresponding 1 bit to be visible.
If the region includes pixels outside the rect() of the widget, window system controls in that area may or may not be visible, depending on the platform.
Note that this effect can be slow if the region is particularly complex.
The following code shows how an image with an alpha channel can be used to generate a mask for a widget:
The label shown by this code is masked using the image it contains, giving the appearance that an irregularly-shaped image is being drawn directly onto the screen.
Masked widgets receive mouse events only on their visible portions.
Definition at line 13309 of file qwidget.cpp.
Referenced by QBalloonTip::balloon(), clearMask(), QMenu::event(), QPlastiqueStyle::eventFilter(), QTipLabel::resizeEvent(), QSplitterHandle::resizeEvent(), QShapedPixmapWidget::setPixmap(), QWorkspaceChild::updateMask(), QDockAreaLayoutInfo::updateSeparatorWidgets(), QDockAreaLayout::updateSeparatorWidgets(), and QApplication::widgetAt().
void QWidget::setMask | ( | const QRegion & | region | ) |
Causes only the parts of the widget which overlap region to be visible.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
If the region includes pixels outside the rect() of the widget, window system controls in that area may or may not be visible, depending on the platform.
Note that this effect can be slow if the region is particularly complex.
Definition at line 13227 of file qwidget.cpp.
void QWidget::setMaximumHeight | ( | int | maxh | ) |
Definition at line 4352 of file qwidget.cpp.
Referenced by QStyleSheetStyle::setGeometry().
|
inline |
Definition at line 972 of file qwidget.h.
Referenced by QLayout::activate(), QMainWindowLayout::insertIntoMacToolbar(), QmlJSDebugger::QmlToolBar::QmlToolBar(), QMainWindowLayout::removeFromMacToolbar(), setFixedHeight(), setFixedWidth(), setMaximumHeight(), setMaximumWidth(), QWizardHeader::setup(), QDialog::showExtension(), and QToolBarLayout::updateGeomArray().
void QWidget::setMaximumSize | ( | int | maxw, |
int | maxh | ||
) |
This function corresponds to setMaximumSize(QSize(maxw, maxh)).
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Sets the maximum width to maxw and the maximum height to maxh.
Definition at line 4201 of file qwidget.cpp.
void QWidget::setMaximumWidth | ( | int | maxw | ) |
Definition at line 4343 of file qwidget.cpp.
Referenced by QBalloonTip::QBalloonTip(), QExpandingLineEdit::resizeToContents(), and QStyleSheetStyle::setGeometry().
void QWidget::setMinimumHeight | ( | int | minh | ) |
Definition at line 4334 of file qwidget.cpp.
Referenced by QColorShower::QColorShower(), QStyleSheetStyle::setGeometry(), and QWorkspaceChild::showShaded().
|
inline |
Definition at line 969 of file qwidget.h.
Referenced by QLayout::activate(), QSystemTrayIconSys::addToTray(), QmlJSDebugger::QmlToolBar::QmlToolBar(), QWorkspaceChild::QWorkspaceChild(), setFixedHeight(), setFixedWidth(), QToolBar::setIconSize(), setMinimumHeight(), setMinimumWidth(), QToolBar::setToolButtonStyle(), QWizardHeader::setup(), QDialog::showExtension(), QMdiSubWindow::showShaded(), and QWorkspaceChild::showShaded().
void QWidget::setMinimumSize | ( | int | minw, |
int | minh | ||
) |
This function corresponds to setMinimumSize(QSize(minw, minh)).
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Sets the minimum width to minw and the minimum height to minh.
Definition at line 4138 of file qwidget.cpp.
void QWidget::setMinimumWidth | ( | int | minw | ) |
Definition at line 4325 of file qwidget.cpp.
Referenced by QColumnViewPrivate::createColumn(), QColumnView::initializeColumn(), QColorShower::QColorShower(), QScriptDebuggerCodeFinderWidget::QScriptDebuggerCodeFinderWidget(), QStyleSheetStyle::setGeometry(), QColumnViewPreviewColumn::setPreviewWidget(), and QExpandingLineEdit::updateMinimumWidth().
|
inline |
Definition at line 990 of file qwidget.h.
Referenced by QMenuBar::changeEvent(), QMenu::changeEvent(), QComboBoxPrivateContainer::changeEvent(), QMdi::ControllerWidget::ControllerWidget(), QGraphicsScenePrivate::enableMouseTrackingOnViews(), QTextBrowserPrivate::init(), QMenuPrivate::init(), QGLOverlayWidget::paintGL(), QMDIControl::QMDIControl(), QMdiSubWindow::QMdiSubWindow(), QScriptEditExtraArea::QScriptEditExtraArea(), qt_mac_get_widget_rgn(), QTipLabel::QTipLabel(), QWhatsThat::QWhatsThat(), QWidgetResizeHandler::QWidgetResizeHandler(), QWorkspaceChild::QWorkspaceChild(), QWorkspaceTitleBar::QWorkspaceTitleBar(), QGraphicsItem::setCursor(), QComboBoxPrivateContainer::setItemView(), QGLWidget::setMouseTracking(), QLabel::setText(), QGraphicsView::setupViewport(), QmlJSDebugger::QDeclarativeViewInspectorPrivate::setViewport(), and QGLWidgetPrivate::updateColormap().
void QWidget::setPalette | ( | const QPalette & | palette | ) |
Use the single-argument overload instead.
Definition at line 4858 of file qwidget.cpp.
Referenced by QFocusFrame::eventFilter(), QCalToolButton::paintEvent(), QMacStyle::polish(), QWindowsVistaStyle::polish(), QBalloonTip::QBalloonTip(), QMacNativeWidget::QMacNativeWidget(), QTipLabel::QTipLabel(), QWhatsThat::QWhatsThat(), QWizardPrivate::recreateLayout(), QToolTip::setPalette(), QStyleSheetStyle::setPalette(), QMacStyle::unpolish(), QStyleSheetStyle::unsetPalette(), QToolBoxPrivate::updateTabs(), QComboBoxPrivate::updateViewContainerPaletteAndOpacity(), QScriptDebuggerLocalsItemDelegate::validateInput(), and QScriptBreakpointsItemDelegate::validateInput().
void QWidget::setParent | ( | QWidget * | parent | ) |
Sets the parent of the widget to parent, and resets the window flags.
The widget is moved to position (0, 0) in its new parent.
If the new parent widget is in a different window, the reparented widget and its children are appended to the end of the tab chain of the new parent widget, in the same internal order as before. If one of the moved widgets had keyboard focus, setParent() calls clearFocus() for that widget.
If the new parent widget is in the same window as the old parent, setting the parent doesn't change the tab order or keyboard focus.
If the "new" parent widget is the old parent widget, this function does nothing.
Definition at line 10479 of file qwidget.cpp.
Referenced by QMenuPrivate::QMacMenuPrivate::addAction(), QDialogButtonBox::addButton(), QLayout::addChildWidget(), QMdiArea::addSubWindow(), QAbstractScrollAreaScrollBarContainer::addWidget(), QMdiAreaPrivate::appendChild(), QColumnViewPrivate::createColumn(), QWorkspacePrivate::insertIcon(), QMainWindowLayout::insertIntoMacToolbar(), QSplitterPrivate::insertWidget_helper(), QWidgetPrivate::isBackgroundInherited(), QDialog::open(), QGtkStylePrivate::openDirectory(), QGtkStylePrivate::openFilename(), QGtkStylePrivate::openFilenames(), QPrintDialogPrivate::openWindowsPrintDialogModally(), q_createNativeChildrenAndSetParent(), qt_win_get_existing_directory(), qt_win_get_open_file_name(), qt_win_get_open_file_names(), qt_win_get_save_file_name(), qt_x11_recreateWidget(), QTornOffMenu::QTornOffMenu(), QWorkspaceChild::QWorkspaceChild(), QMdiSubWindowPrivate::removeBaseWidget(), QDialogButtonBox::removeButton(), QMdi::ControlContainer::removeButtonsFromMenuBar(), QMainWindowLayout::removeFromMacToolbar(), QLayoutPrivate::reparentChildWidgets(), QAbstractScrollAreaPrivate::replaceScrollBar(), QDeclarativeVME::run(), QGtkStylePrivate::saveFilename(), QWizard::setButton(), QProgressDialog::setCancelButton(), QAbstractScrollArea::setCornerWidget(), QMenuBar::setCornerWidget(), QTabWidget::setCornerWidget(), QDialog::setExtension(), QAbstractItemView::setIndexWidget(), QComboBoxPrivateContainer::setItemView(), QProgressDialog::setLabel(), QWizard::setPage(), QCompleter::setPopup(), QColumnViewPrivate::setPreviewWidget(), QDeclarativeView::setRootObject(), QMdiSubWindowPrivate::setSizeGrip(), QMdiSubWindow::setSystemMenu(), QTabWidget::setTabBar(), QTabBar::setTabButton(), QMdiArea::setupViewport(), QScrollArea::setWidget(), QMdiSubWindow::setWidget(), setWindowFlags(), QMessageBox::setWindowModality(), and QScrollArea::takeWidget().
void QWidget::setParent | ( | QWidget * | parent, |
Qt::WindowFlags | f | ||
) |
This function also takes widget flags, f as an argument.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 10495 of file qwidget.cpp.
void QWidget::setShortcutAutoRepeat | ( | int | id, |
bool | enable = true |
||
) |
If enable is true, auto repeat of the shortcut with the given id is enabled; otherwise it is disabled.
Definition at line 11808 of file qwidget.cpp.
void QWidget::setShortcutEnabled | ( | int | id, |
bool | enable = true |
||
) |
If enable is true, the shortcut with the given id is enabled; otherwise the shortcut is disabled.
Definition at line 11790 of file qwidget.cpp.
Referenced by QTabBar::setTabEnabled(), and QTabBar::setTabText().
|
inlineslot |
void QWidget::setSizeIncrement | ( | int | w, |
int | h | ||
) |
Sets the x (width) size increment to w and the y (height) size increment to h.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 4234 of file qwidget.cpp.
void QWidget::setSizePolicy | ( | QSizePolicy | policy | ) |
Definition at line 10198 of file qwidget.cpp.
Referenced by QAbstractScrollAreaScrollBarContainer::addWidget(), QMdi::ControllerWidget::ControllerWidget(), QCalendarWidgetPrivate::createNavigationBar(), DetailButton::DetailButton(), QInputDialogPrivate::ensureLayout(), QSplitterPrivate::findWidget(), QTabWidgetPrivate::init(), QBalloonTip::QBalloonTip(), QCalendarWidget::QCalendarWidget(), QColorPicker::QColorPicker(), QColorWell::QColorWell(), QComboBoxPrivateScroller::QComboBoxPrivateScroller(), QDeclarativeView::QDeclarativeView(), QMDIControl::QMDIControl(), QToolBarExtension::QToolBarExtension(), QToolBarSeparator::QToolBarSeparator(), QToolBoxButton::QToolBoxButton(), QWizardHeader::QWizardHeader(), QWorkspaceTitleBar::QWorkspaceTitleBar(), QX11EmbedContainer::QX11EmbedContainer(), QX11EmbedWidget::QX11EmbedWidget(), QFrame::setFrameStyle(), QComboBoxPrivateContainer::setItemView(), QSplitter::setOrientation(), QToolBar::setOrientation(), QProgressBar::setOrientation(), QAbstractSlider::setOrientation(), QSplitter::setStretchFactor(), QMainWindow::statusBar(), and QCoreFuriCuri::timerEvent().
|
inline |
Sets the size policy of the widget to horizontal and vertical, with standard stretch and no height-for-width.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 1038 of file qwidget.h.
void QWidget::setStatusTip | ( | const QString & | s | ) |
Definition at line 11629 of file qwidget.cpp.
Referenced by QToolButton::QToolButton(), QToolButton::setDefaultAction(), QListWidgetItem::statusTip(), and QHeaderView::viewportEvent().
void QWidget::setStyle | ( | QStyle * | style | ) |
Sets the widget's GUI style to style.
The ownership of the style object is not transferred.
If no style is set, the widget uses the application's style, QApplication::style() instead.
Setting a widget's style has no effect on existing or future child widgets.
Definition at line 2772 of file qwidget.cpp.
Referenced by QDialogButtonBoxPrivate::createButton(), QWizardPrivate::ensureButton(), QWidgetPrivate::inheritStyle(), and QWizardPrivate::QWizardPrivate().
|
slot |
Definition at line 2709 of file qwidget.cpp.
Referenced by QTipLabel::placeTip(), QScriptDebuggerConsoleWidget::QScriptDebuggerConsoleWidget(), QScriptDebugOutputWidget::QScriptDebugOutputWidget(), and QApplication::setStyle().
Puts the second widget after the first widget in the focus order.
Note that since the tab order of the second widget is changed, you should order a chain like this:
not like this:
If first or second has a focus proxy, setTabOrder() correctly substitutes the proxy.
Definition at line 6975 of file qwidget.cpp.
Referenced by QAbstractItemViewPrivate::editor(), QDialogButtonBoxPrivate::layoutButtons(), and QWizardPrivate::setButtonLayout().
void QWidget::setToolTip | ( | const QString & | s | ) |
Definition at line 11600 of file qwidget.cpp.
Referenced by CloseButton::CloseButton(), QToolTip::hideText(), QmlJSDebugger::QDeclarativeViewInspector::mouseMoveEvent(), QToolButton::QToolButton(), QToolButton::setDefaultAction(), QToolBoxPrivate::Page::setToolTip(), and QListWidgetItem::toolTip().
void QWidget::setUpdatesEnabled | ( | bool | enable | ) |
Definition at line 7670 of file qwidget.cpp.
Referenced by QScriptDebuggerPrivate::handleResponse(), QAccessibleItemRow::navigate(), QRollEffect::scroll(), QStackedLayout::setCurrentIndex(), and QComboBox::showPopup().
QWidget::setupUi | ( | QWidget * | widget | ) |
Sets up the user interface for the specified widget.
Referenced by QAxSelect::QAxSelect().
|
virtualslot |
Reimplemented in QFileDialog, QWizard, QInputDialog, QMessageBox, QPrintDialog, QFontDialog, QColorDialog, QPrintPreviewWidget, QPageSetupDialog, QPrintPreviewDialog, QDialog, and QSizeGrip.
Definition at line 7991 of file qwidget.cpp.
Referenced by QPrintDialogPrivate::_q_collapseOrExpandDialog(), QMdiSubWindow::changeEvent(), QColumnViewPrivate::closeColumns(), QColumnViewPrivate::createColumn(), QCalendarView::QCalendarView(), QDesktopScreenWidget::QDesktopScreenWidget(), QRubberBand::QRubberBand(), QWizardPrivate::recreateLayout(), QMainWindowLayout::removeFromMacToolbar(), QAbstractScrollAreaPrivate::replaceScrollBar(), QDockAreaLayout::restoreDockWidget(), QDockAreaLayoutInfo::restoreState(), QToolBarAreaLayout::restoreState(), QDeclarativeView::setRootObject(), QStackedLayout::setStackingMode(), QSizeGrip::setVisible(), QDialog::setVisible(), QPrintPreviewWidget::setVisible(), QMenuBar::setVisible(), QMdiSubWindow::showShaded(), QETWidget::translateEmbedEvent(), QMenuPrivate::updateActionRects(), QDockWidgetPrivate::updateButtons(), and QMainWindowLayout::updateGapIndicator().
void QWidget::setWhatsThis | ( | const QString & | s | ) |
Definition at line 11655 of file qwidget.cpp.
Referenced by QWhatsThis::QWhatsThis(), QToolButton::setDefaultAction(), and QListWidgetItem::whatsThis().
void QWidget::setWindowFilePath | ( | const QString & | filePath | ) |
Definition at line 6449 of file qwidget.cpp.
void QWidget::setWindowFlags | ( | Qt::WindowFlags | type | ) |
Definition at line 10399 of file qwidget.cpp.
Referenced by QMdiAreaPrivate::appendChild(), QRubberBand::changeEvent(), QDialog::exec(), QMdiAreaPrivate::highlightNextSubWindow(), QDesktopScreenWidget::QDesktopScreenWidget(), QDialog::QDialog(), QmlJSDebugger::QmlToolBar::QmlToolBar(), qt_mac_updateToolBarButtonHint(), QWizard::QWizard(), QmlJSDebugger::AbstractViewInspector::setShowAppOnTop(), QColorDialog::setVisible(), and QMdiSubWindowPrivate::setWindowFlags().
void QWidget::setWindowIcon | ( | const QIcon & | icon | ) |
Definition at line 6362 of file qwidget.cpp.
Referenced by QMdi::ControlContainer::ControlContainer(), QWorkspaceChild::QWorkspaceChild(), QMdiSubWindow::setWidget(), update(), and QMdi::ControlContainer::updateWindowIcon().
void QWidget::setWindowIconText | ( | const QString & | iconText | ) |
Definition at line 6299 of file qwidget.cpp.
void QWidget::setWindowModality | ( | Qt::WindowModality | windowModality | ) |
Definition at line 2991 of file qwidget.cpp.
Referenced by create(), QMessageBox::critical(), QDialog::open(), and QMessageBox::setWindowModality().
|
slot |
Definition at line 11559 of file qwidget.cpp.
Referenced by QMdiSubWindow::event(), QWorkspace::eventFilter(), QMdiSubWindow::eventFilter(), QWorkspaceChild::eventFilter(), QMdiSubWindowPrivate::removeButtonsFromMenuBar(), QMdiSubWindow::setWidget(), and QMdiSubWindowPrivate::showButtonsInMenuBar().
void QWidget::setWindowOpacity | ( | qreal | level | ) |
Definition at line 11497 of file qwidget.cpp.
Referenced by QWindowsXPStyle::polish(), QMacStyle::polish(), QTipLabel::QTipLabel(), QAlphaWidget::render(), QAlphaWidget::run(), QWindowsXPStyle::unpolish(), QMacStyle::unpolish(), and QAlphaWidget::~QAlphaWidget().
void QWidget::setWindowRole | ( | const QString & | role | ) |
Sets the window's role to role.
This only makes sense for windows on X11.
Definition at line 6493 of file qwidget.cpp.
void QWidget::setWindowState | ( | Qt::WindowStates | windowState | ) |
Sets the window state to windowState.
The window state is a OR'ed combination of Qt::WindowState: Qt::WindowMinimized, Qt::WindowMaximized, Qt::WindowFullScreen, and Qt::WindowActive.
If the window is not visible (i.e. isVisible() returns false), the window state will take effect when show() is called. For visible windows, the change is immediate. For example, to toggle between full-screen and normal mode, use the following code:
In order to restore and activate a minimized window (while preserving its maximized and/or full-screen state), use the following:
Calling this function will hide the widget. You must call show() to make the widget visible again.
When the window state changes, the widget receives a changeEvent() of type QEvent::WindowStateChange.
Definition at line 3740 of file qwidget_mac.mm.
Referenced by effectiveState(), QDialog::event(), QDialog::exec(), QApplicationPrivate::globalEventProcessor(), qstring_to_xtp(), qt_grab_cursor(), qt_tablet_cleanup_wce(), QtWndProc(), QDockAreaLayout::restoreDockWidget(), restoreGeometry(), QToolBarAreaLayout::restoreState(), QWorkspace::setActiveWindow(), QDialog::setVisible(), setVisible(), QDialog::showEvent(), showFullScreen(), showMaximized(), QWorkspaceChild::showMaximized(), showMinimized(), QWorkspaceChild::showMinimized(), showNormal(), and QWorkspaceChild::showNormal().
void QWidget::setWindowSurface | ( | QWindowSurface * | surface | ) |
Sets the window surface to be the surface specified.
This function is under development and subject to change.
The QWidget takes will ownership of the surface. widget itself is deleted.
Definition at line 12774 of file qwidget.cpp.
Referenced by PvrEglScreenSurfaceFunctions::createNativeWindow(), QRuntimeGraphicsSystem::createWindowSurface(), and QWindowSurface::QWindowSurface().
|
slot |
Definition at line 6312 of file qwidget.cpp.
Referenced by QAxClientSite::activateObject(), QMainWindow::addToolBar(), QMessageBox::critical(), QWorkspace::eventFilter(), QWorkspaceChild::eventFilter(), QColorDialog::getColor(), QInputDialog::getDouble(), QFontDialogPrivate::getFont(), QInputDialog::getInt(), QInputDialog::getText(), QWorkspaceChild::iconWidget(), QToolBar::isAreaAllowed(), parseGeometry(), QAbstractPageSetupDialog::QAbstractPageSetupDialog(), QAbstractPrintDialog::QAbstractPrintDialog(), QDockWidget::QDockWidget(), QmlJSDebugger::QmlToolBar::QmlToolBar(), QErrorMessage::qtHandler(), QToolBar::QToolBar(), QTornOffMenu::QTornOffMenu(), QWorkspaceChild::QWorkspaceChild(), QWorkspaceTitleBar::QWorkspaceTitleBar(), QMdi::ControlContainer::removeButtonsFromMenuBar(), QAccessibleMdiSubWindow::setText(), QMessageBox::setWindowTitle(), QScriptEngineDebugger::standardWindow(), and QCoreFuriCuri::timerEvent().
|
slot |
Shows the widget and its child widgets.
This function is equivalent to setVisible(true).
Definition at line 639 of file qwidget_wince.cpp.
Referenced by QScriptDebuggerPrivate::_q_findInScript(), QCalendarWidgetPrivate::_q_yearClicked(), QCalendarWidgetPrivate::_q_yearEditingFinished(), QMessageBox::about(), QMessageBox::aboutQt(), QAxClientSite::activateObject(), QAxServerBase::ActiveXProc(), QMenuPrivate::QMacMenuPrivate::addAction(), QDialogButtonBoxPrivate::addButtonsToLayout(), QMainWindow::addDockWidget(), QAbstractScrollArea::addScrollBarWidget(), QMainWindowLayout::animationFinished(), QBalloonTip::balloon(), QSplitter::childEvent(), QEgl::createSurface(), QInputDialogPrivate::ensureLayout(), QMdiSubWindowPrivate::enterRubberBandMode(), QFocusFrame::eventFilter(), QMdiSubWindow::eventFilter(), QDialog::exec(), QProgressDialog::forceShow(), QStatusBar::hideOrShow(), QWorkspacePrivate::insertIcon(), QToolBox::insertItem(), QStatusBar::insertPermanentWidget(), QStatusBar::insertWidget(), QSplitterPrivate::insertWidget(), QSplitterPrivate::insertWidget_helper(), QDialogButtonBoxPrivate::layoutButtons(), QTabBarPrivate::layoutTabs(), QMenuPrivate::mouseEventTaken(), QDialog::open(), QAbstractItemViewPrivate::openEditor(), QAbstractItemView::openPersistentEditor(), QGLOverlayWidget::paintGL(), QMenu::popup(), qt_mac_unregister_widget(), QAxClientSite::qt_metacall(), qt_x11_recreateWidget(), QApplication::qwsProcessEvent(), QMdi::ControlContainer::removeButtonsFromMenuBar(), QAlphaWidget::render(), QMainWindowLayout::restoreState(), QAlphaWidget::run(), QRollEffect::run(), QWhatsThisPrivate::say(), QRollEffect::scroll(), QProgressDialog::setCancelButton(), QAbstractScrollArea::setCornerWidget(), QStackedLayout::setCurrentIndex(), QToolBarLayout::setGeometry(), QAbstractItemView::setIndexWidget(), QInputDialogPrivate::setInputWidget(), QProgressDialog::setLabel(), QMdiSubWindowPrivate::setMaximizeMode(), QMdiSubWindowPrivate::setNormalMode(), QCompleter::setPopup(), QTreeView::setRootIsDecorated(), QmlJSDebugger::AbstractViewInspector::setShowAppOnTop(), QTableView::setShowGrid(), QHeaderView::setSortIndicatorShown(), QTabWidget::setTabBar(), QTabBar::setTabButton(), QProgressDialog::setValue(), QCalendarWidget::setVerticalHeaderFormat(), QMdiAreaPrivate::setViewMode(), QGraphicsProxyWidgetPrivate::setWidget_helper(), QDockWidgetLayout::setWidgetForRole(), QWorkspaceChild::show(), QMdi::ControlContainer::showButtonsInMenuBar(), QWidgetPrivate::showChildren(), QmlApplicationViewer::showExpanded(), showFullScreen(), showMaximized(), QErrorMessage::showMessage(), showMinimized(), showNormal(), QCompleterPrivate::showPopup(), QComboBox::showPopup(), QMdiAreaPrivate::showRubberBandFor(), QToolTip::showText(), QWorkspacePrivate::showWindow(), QWizardPrivate::switchToPage(), QAbstractItemView::updateEditorGeometries(), QComboBoxPrivateContainer::updateScrollers(), QDockAreaLayoutInfo::updateSeparatorWidgets(), QDockAreaLayout::updateSeparatorWidgets(), and QSystemTrayIconSys::x11Event().
|
protectedvirtual |
This event handler can be reimplemented in a subclass to receive widget show events which are passed in the event parameter.
Non-spontaneous show events are sent to widgets immediately before they are shown. The spontaneous show events of windows are delivered afterwards.
Note: A widget receives spontaneous show and hide events when its mapping status is changed by the window system, e.g. a spontaneous hide event when the user minimizes the window, and a spontaneous show event when the window is restored again. After receiving a spontaneous hide event, a widget is still considered visible in the sense of isVisible().
Reimplemented in QMessageBox, QTextEdit, QGraphicsView, QPlainTextEdit, QComboBoxPrivateContainer, QComboBox, QTabBar, QTabWidget, QWhatsThat, QMdiArea, QAbstractSpinBox, QAxHostWidget, QProgressDialog, QX11EmbedContainer, QMdiSubWindow, QDialog, QWorkspace, QToolBox, QPrintPropertiesDialog, QStatusBar, QRubberBand, QWSEmbedWidget, and QSizeGrip.
Definition at line 9842 of file qwidget.cpp.
Referenced by QComboBox::addItems(), event(), QRubberBand::resize(), setShown(), QWidgetPrivate::show_helper(), QSizeGrip::showEvent(), QToolBox::showEvent(), QWorkspace::showEvent(), QMdiSubWindow::showEvent(), QMdiArea::showEvent(), QComboBox::showEvent(), QGraphicsView::showEvent(), and QPlainTextEdit::toPlainText().
|
slot |
Shows the widget in full-screen mode.
Calling this function only affects windows.
To return from full-screen mode, call showNormal().
Full-screen mode works fine under Windows, but has certain problems under X. These problems are due to limitations of the ICCCM protocol that specifies the communication between X11 clients and the window manager. ICCCM simply does not understand the concept of non-decorated full-screen windows. Therefore, the best we can do is to request a borderless window and place and resize it to fill the entire screen. Depending on the window manager, this may or may not work. The borderless window is requested using MOTIF hints, which are at least partially supported by virtually all modern window managers.
An alternative would be to bypass the window manager entirely and create a window with the Qt::X11BypassWindowManagerHint flag. This has other severe problems though, like totally broken keyboard focus and very strange effects on desktop changes or when the user raises other windows.
X11 window managers that follow modern post-ICCCM specifications support full-screen mode properly.
Definition at line 3185 of file qwidget.cpp.
Referenced by QmlApplicationViewer::showExpanded().
|
slot |
Shows the widget maximized.
Calling this function only affects windows.
On X11, this function may not work properly with certain window managers. See the Window Geometry documentation for an explanation.
Definition at line 3218 of file qwidget.cpp.
Referenced by QWorkspace::addWindow(), QMdiAreaPrivate::emitWindowActivated(), QMdiSubWindow::event(), QMdiSubWindow::eventFilter(), main(), QMdiSubWindow::mouseDoubleClickEvent(), QApplication::qwsProcessEvent(), QApplication::qwsSetCustomColors(), QDecoration::regionClicked(), QDecoration::regionDoubleClicked(), QMdiAreaPrivate::setViewMode(), and QmlApplicationViewer::showExpanded().
|
slot |
Shows the widget minimized, as an icon.
Calling this function only affects windows.
Definition at line 3038 of file qwidget.cpp.
Referenced by QWorkspace::addWindow(), QMdiSubWindow::event(), QMdiSubWindow::eventFilter(), QtWndProc(), and QApplication::qwsProcessEvent().
|
slot |
Restores the widget after it has been maximized or minimized.
Calling this function only affects windows.
Definition at line 3250 of file qwidget.cpp.
Referenced by QMdiAreaPrivate::_q_deactivateAllWindows(), QMdiSubWindow::event(), QMdiSubWindow::eventFilter(), QMdiSubWindow::mouseDoubleClickEvent(), QApplication::qwsProcessEvent(), QMdiAreaPrivate::rearrange(), QDecoration::regionClicked(), QDecoration::regionDoubleClicked(), and QMdiAreaPrivate::setViewMode().
QSize QWidget::size | ( | ) | const |
Referenced by QPageSetupWidget::_q_paperSizeChanged(), QFontDialogPrivate::_q_sizeChanged(), QFontDialogPrivate::_q_sizeHighlighted(), QMessageBox::about(), QX11EmbedContainerPrivate::acceptClient(), QAxClientSite::activateObject(), QToolBarLayout::checkUsePopupMenu(), QSystemTrayIconSys::createIcon(), QHeaderViewPrivate::createSectionSpan(), QSplitterPrivate::doResize(), QVistaHelper::drawTitleBar(), QMdiSubWindow::event(), QAxHostWidget::event(), QMainWindowTabBar::event(), QWorkspaceChild::eventFilter(), QToolBarLayout::expandedSize(), QPixmap::fill(), fixToolBarOrientation(), QTabWidget::heightForWidth(), QAccessibleDisplay::imagePosition(), QFontDialogPrivate::init(), QTreeViewPrivate::itemDecorationRect(), QAbstractScrollArea::maximumViewportSize(), QGroupBox::minimumSizeHint(), QProgressBar::minimumSizeHint(), QMdiArea::minimumSizeHint(), QAxHostWidget::minimumSizeHint(), QTabBarPrivate::minimumTabSizeHint(), QHeaderView::moveSection(), QDockWidgetTitleButton::paintEvent(), QAxHostWidget::paintEvent(), QTabWidget::paintEvent(), QListView::paintEvent(), QTabBar::paintEvent(), QGraphicsView::paintEvent(), QMdiAreaPrivate::place(), QMenu::popup(), QtWndProc(), QWizardPrivate::QWizardPrivate(), QWidgetPrivate::render_helper(), QWSEmbedWidget::resizeEvent(), QAxWidget::resizeEvent(), QMdiArea::resizeEvent(), restoreGeometry(), QDeclarativeViewPrivate::rootObjectSize(), QDesktopWidget::screenNumber(), scroll(), QColumnView::scrollTo(), QHeaderView::sectionSizeFromContents(), QHeaderView::sectionSizeHint(), QWizardPrivate::setButtonLayout(), QDateTimeEdit::setCurrentSection(), QHeaderViewPrivate::setDefaultSectionSize(), QDockWidget::setFloating(), setGeometry(), QHeaderViewPrivate::setHeaderSectionResizeMode(), QAbstractButton::setIconSize(), QTabBar::setIconSize(), QComboBox::setIconSize(), QAbstractItemView::setIconSize(), QHeaderView::setMinimumSectionSize(), QHeaderView::setOffsetToLastSection(), QDeclarativeView::setRootObject(), QHeaderView::setSectionHidden(), QWizardHeader::setup(), QPageSetupWidget::setupPrinter(), QWSEmbedWidget::showEvent(), QMdiSubWindow::showEvent(), QMdiArea::showEvent(), QDialog::showExtension(), QWorkspaceChild::showShaded(), QScrollBar::sizeHint(), QCommandLinkButton::sizeHint(), QVistaBackButton::sizeHint(), QMdiSubWindow::sizeHint(), QWorkspace::sizeHint(), QProgressBar::sizeHint(), QMDIControl::sizeHint(), QProgressDialog::sizeHint(), QDeclarativeView::sizeHint(), QMdiArea::sizeHint(), QDockWidgetTitleButton::sizeHint(), QGraphicsView::sizeHint(), QTabWidget::sizeHint(), QWizard::sizeHint(), QMdi::ControllerWidget::sizeHint(), QMessageBoxPrivate::updateSize(), and QFontDialogPrivate::updateSizes().
|
virtual |
Reimplemented in QWorkspaceChild, QColorPicker, QMdi::ControllerWidget, QMdi::ControlLabel, QFileDialogTreeView, QFileDialogListView, QWorkspaceTitleBar, CloseButton, QComboBox, QMessageBox, QWizard, QSplitterHandle, QInputDialog, QDateTimeEdit, QComboBoxPrivateScroller, QTabBar, DetailButton, QLineEdit, QMenu, QTabWidget, QSidebar, QGraphicsView, QAbstractSpinBox, QDockWidgetTitleButton, QAxHostWidget, QErrorMessageTextView, QLCDNumber, QLabel, QCalendarWidget, QMenuBar, QWellArray, QMdiArea, QDeclarativeView, QProgressDialog, QAbstractScrollArea, QMenuBarExtension, QSplitter, QMDIControl, QProgressBar, QHeaderView, QSlider, QFontComboBox, QDialog, QDial, QToolButton, QAxWidget, QMdiSubWindow, QWorkspace, QFrame, QToolBoxButton, QToolBarSeparator, QScrollArea, QVistaBackButton, QColumnView, QPushButton, QCommandLinkButton, QToolBarExtension, QSvgWidget, QCheckBox, QScrollBar, QScriptEditExtraArea, QRadioButton, QSizeGrip, and QMacNativeWidget.
Referenced by QComboBox::addItems(), adjustSize(), QBalloonTip::balloon(), QToolBar::event(), fixToolBarOrientation(), QMainWindowLayout::insertIntoMacToolbar(), QMainWindowLayout::minimumSize(), QDateTimeEditPrivate::positionCalendarPopup(), restoreGeometry(), QFrame::sizeHint(), QAxWidget::sizeHint(), QDialog::sizeHint(), QAxHostWidget::sizeHint(), and QWorkspaceChild::sizeHint().
QSize QWidget::sizeIncrement | ( | ) | const |
Referenced by setDisabled().
QSizePolicy QWidget::sizePolicy | ( | ) | const |
void QWidget::stackUnder | ( | QWidget * | w | ) |
Places the widget under w in the parent widget's stack.
To make this work, the widget itself and w must be siblings.
Definition at line 11972 of file qwidget.cpp.
Referenced by QFocusFrame::eventFilter(), QMdiAreaPrivate::internalRaise(), and QWorkspaceChild::internalRaise().
QString QWidget::statusTip | ( | ) | const |
Referenced by QToolButton::QToolButton(), setStatusTip(), and QListWidgetItem::statusTip().
QStyle * QWidget::style | ( | ) | const |
Definition at line 2742 of file qwidget.cpp.
Referenced by QFontDialogPrivate::_q_styleHighlighted(), QFontDialogPrivate::_q_updateSample(), QDialog::adjustPosition(), QWorkspaceChild::adjustToFullscreen(), QWorkspaceChild::baseSize(), QStylePainter::begin(), QMenuBarPrivate::calcActionRects(), QWorkspace::changeEvent(), QToolButton::changeEvent(), QMenuBar::changeEvent(), QAbstractButton::changeEvent(), QAbstractSpinBox::changeEvent(), QDialogButtonBox::changeEvent(), QMenu::changeEvent(), QTabBar::changeEvent(), QLineEdit::changeEvent(), QComboBoxPrivateContainer::changeEvent(), QComboBox::changeEvent(), QMessageBox::changeEvent(), QWorkspaceChild::changeEvent(), QItemDelegate::check(), QScrollBar::contextMenuEvent(), QWorkspaceTitleBar::contextMenuEvent(), QDefaultItemEditorFactory::createEditor(), QMenuBar::defaultAction(), QItemDelegate::doLayout(), QTreeView::drawBranches(), QItemDelegate::drawCheck(), QCommonStyle::drawControl(), QItemDelegate::drawDisplay(), QItemDelegate::drawFocus(), QFrame::drawFrame(), QTreeView::drawRow(), QStyledItemDelegate::editorEvent(), QWizardPrivate::ensureButton(), QGroupBox::event(), QMDIControl::event(), QAbstractScrollArea::event(), QMdiSubWindow::event(), QToolBar::event(), QMenu::event(), QWizard::event(), QLineEdit::event(), event(), QFocusFrame::eventFilter(), QWindowsStyle::eventFilter(), QMenuBar::eventFilter(), QToolBarLayout::expandedSize(), QLineEdit::focusInEvent(), QTextControl::getPaintContext(), QFormLayoutPrivate::getStyle(), QMdi::ControllerWidget::getSubControl(), QMenuBar::heightForWidth(), QTabWidget::heightForWidth(), QMenuPrivate::hideMenu(), QComboBox::hidePopup(), QRadioButton::hitButton(), QCheckBox::hitButton(), QWorkspaceChild::iconWidget(), QWidgetPrivate::inheritStyle(), QTabBarPrivate::initStyleBaseOption(), QToolButton::initStyleOption(), QToolBar::initStyleOption(), QLineEdit::initStyleOption(), QTabBar::insertTab(), QMenu::internalDelayedPopup(), QMenuBar::keyPressEvent(), QAbstractSpinBox::keyPressEvent(), QMenu::keyPressEvent(), QAbstractItemView::keyPressEvent(), QToolBarLayout::layoutActions(), QWizardPrivate::layoutInfoForCurrentPage(), QGroupBox::minimumSizeHint(), QToolBoxButton::minimumSizeHint(), QMdiSubWindow::minimumSizeHint(), QAbstractScrollArea::minimumSizeHint(), QSlider::minimumSizeHint(), QMdiArea::minimumSizeHint(), QMenuBar::minimumSizeHint(), QCalendarWidget::minimumSizeHint(), QAbstractSpinBox::minimumSizeHint(), QLineEdit::minimumSizeHint(), QTabWidget::minimumSizeHint(), QDockWidgetLayout::minimumTitleWidth(), QTreeView::mouseDoubleClickEvent(), QWorkspaceTitleBar::mouseDoubleClickEvent(), QAbstractItemView::mouseDoubleClickEvent(), QCalendarView::mouseDoubleClickEvent(), QScrollBar::mouseMoveEvent(), QMDIControl::mouseMoveEvent(), QGroupBox::mouseMoveEvent(), QMdiSubWindow::mouseMoveEvent(), QMenu::mouseMoveEvent(), QWorkspaceTitleBar::mouseMoveEvent(), QScrollBar::mousePressEvent(), QMDIControl::mousePressEvent(), QGroupBox::mousePressEvent(), QSlider::mousePressEvent(), QToolButton::mousePressEvent(), QMenuBar::mousePressEvent(), QCalendarPopup::mousePressEvent(), QTabBar::mousePressEvent(), QTreeView::mousePressEvent(), QComboBoxPrivateContainer::mousePressEvent(), QComboBox::mousePressEvent(), QWorkspaceTitleBar::mousePressEvent(), QMDIControl::mouseReleaseEvent(), QGroupBox::mouseReleaseEvent(), QSlider::mouseReleaseEvent(), QTabBar::mouseReleaseEvent(), QTreeView::mouseReleaseEvent(), QWorkspaceTitleBar::mouseReleaseEvent(), QAbstractItemView::mouseReleaseEvent(), QCalendarView::mouseReleaseEvent(), QTreeView::moveCursor(), QStyledItemDelegate::paint(), QColumnViewDelegate::paint(), QScriptDebuggerLocalsItemDelegate::paint(), QWellArray::paintCell(), QSizeGrip::paintEvent(), QFocusFrame::paintEvent(), QScrollBar::paintEvent(), QCommandLinkButton::paintEvent(), QToolBarSeparator::paintEvent(), QColumnViewGrip::paintEvent(), QToolBoxButton::paintEvent(), QMDIControl::paintEvent(), QStatusBar::paintEvent(), QSlider::paintEvent(), QComboBoxListView::paintEvent(), QDockWidgetTitleButton::paintEvent(), QMdiSubWindow::paintEvent(), QMenuBar::paintEvent(), QLabel::paintEvent(), QToolBar::paintEvent(), QTableView::paintEvent(), QListView::paintEvent(), QSplitterHandle::paintEvent(), QMenu::paintEvent(), QComboBoxPrivateScroller::paintEvent(), QTabBar::paintEvent(), QHeaderView::paintEvent(), QLineEdit::paintEvent(), CloseButton::paintEvent(), QGraphicsView::paintEvent(), QWorkspaceTitleBar::paintEvent(), QMdi::ControllerWidget::paintEvent(), QWorkspaceChild::paintEvent(), QHeaderView::paintSection(), paintSep(), QTipLabel::placeTip(), QMenu::popup(), previousInFocusChain(), QBalloonTip::QBalloonTip(), QComboBoxPrivateContainer::QComboBoxPrivateContainer(), QDockAreaLayout::QDockAreaLayout(), QFocusFrame::QFocusFrame(), QMainWindowLayout::QMainWindowLayout(), QMdiSubWindow::QMdiSubWindow(), QMenuBarExtension::QMenuBarExtension(), QRenderRule::QRenderRule(), qSmartSpacing(), qt_mac_buttonIsRenderedFlat(), qt_setWindowTitle_helperHelper(), QTipLabel::QTipLabel(), QWizardPrivate::QWizardPrivate(), QWorkspaceChild::QWorkspaceChild(), QWorkspaceTitleBar::QWorkspaceTitleBar(), QMdi::SimpleCascader::rearrange(), QAccessibleAbstractSpinBox::rect(), QAccessibleToolButton::rect(), QAccessibleDoubleSpinBox::rect(), QAccessibleScrollBar::rect(), QAccessibleSlider::rect(), QAccessibleComboBox::rect(), QGraphicsProxyWidgetPrivate::removeSubFocusHelper(), resetInputContext(), QTipLabel::resizeEvent(), QWorkspaceChild::resizeEvent(), QGraphicsViewPrivate::rubberBandRegion(), QHeaderView::sectionSizeFromContents(), setAttribute(), QTabBar::setCurrentIndex(), QHeaderView::setDefaultSectionSize(), QComboBox::setEditable(), setFocus(), QApplicationPrivate::setFocusWidget(), setFont(), QToolBarLayout::setGeometry(), QDockWidgetLayout::setGeometry(), QTableView::setGridStyle(), QMainWindow::setIconSize(), QToolBar::setIconSize(), QMessageBox::setInformativeText(), QComboBoxPrivateContainer::setItemView(), QComboBox::setMinimumContentsLength(), QToolBarExtension::setOrientation(), QLineEdit::setSelection(), QMenu::setSeparatorsCollapsible(), QSplitter::setSizes(), QApplication::setStyle(), QTabBar::setTabsClosable(), QToolButton::setToolButtonStyle(), QBoxLayoutPrivate::setupGeom(), QTabWidget::setUpLayout(), QGridLayoutPrivate::setupSpacings(), QFormLayoutPrivate::setupVerticalLayoutData(), QFocusFrame::setWidget(), QGraphicsProxyWidgetPrivate::setWidget_helper(), QMessageBox::setWindowModality(), QWizard::setWizardStyle(), QMdiSubWindow::showEvent(), QComboBox::showPopup(), QWorkspaceChild::showShaded(), showToolTip(), QDockWidgetLayout::sizeFromContent(), QSizeGrip::sizeHint(), QRadioButton::sizeHint(), QScrollBar::sizeHint(), QCheckBox::sizeHint(), QToolBarExtension::sizeHint(), QPushButton::sizeHint(), QStyledItemDelegate::sizeHint(), QToolBarSeparator::sizeHint(), QToolBoxButton::sizeHint(), QToolButton::sizeHint(), QSlider::sizeHint(), QProgressBar::sizeHint(), QMDIControl::sizeHint(), QProgressDialog::sizeHint(), QMenuBarExtension::sizeHint(), QMenuBar::sizeHint(), QDockWidgetTitleButton::sizeHint(), QAbstractSpinBox::sizeHint(), QTabWidget::sizeHint(), QLineEdit::sizeHint(), QMenu::sizeHint(), DetailButton::sizeHint(), QComboBoxPrivateScroller::sizeHint(), QDateTimeEdit::sizeHint(), QSplitterHandle::sizeHint(), CloseButton::sizeHint(), QWorkspaceTitleBar::sizeHint(), QMdi::ControllerWidget::sizeHint(), QMessageBoxPrivate::standardIcon(), QAccessibleMenuItem::state(), QDockAreaLayout::styleChangedEvent(), QCommonStyle::subElementRect(), QTabBar::tabSizeHint(), QDockWidgetLayout::titleHeight(), QMenuPrivate::updateActionRects(), QStyledItemDelegate::updateEditorGeometry(), QToolBarLayout::updateGeomArray(), QToolBarLayout::updateMarginAndSpacing(), QWorkspaceChild::updateMask(), QExpandingLineEdit::updateMinimumWidth(), QComboBoxPrivateContainer::updateScrollers(), QFormLayoutPrivate::updateSizes(), QFontDialogPrivate::updateStyles(), QComboBoxPrivateContainer::updateTopBottomMargin(), updateWidgets(), QMdi::ControlLabel::updateWindowIcon(), QListView::viewOptions(), QAbstractItemView::viewOptions(), and QX11Data::xdndMimeDataForAtom().
|
protectedvirtual |
Definition at line 12000 of file qwidget.cpp.
Referenced by QApplication::setStyle(), and QWizard::setWizardStyle().
QString QWidget::styleSheet | ( | ) | const |
Referenced by effectiveWinId(), and setStyleSheet().
|
protectedvirtual |
This event handler, for event event, can be reimplemented in a subclass to receive tablet events for the widget.
If you reimplement this handler, it is very important that you ignore() the event if you do not handle it, so that the widget's parent can interpret it.
The default implementation ignores the event.
Definition at line 9347 of file qwidget.cpp.
Referenced by event(), and setShown().
|
private |
Remove the layout from the widget.
Definition at line 10153 of file qwidget.cpp.
Referenced by focusPreviousChild(), and setLayout().
|
inline |
Returns true if attribute attribute is set on this widget; otherwise returns false.
Definition at line 1041 of file qwidget.h.
Referenced by QGroupBoxPrivate::_q_setChildrenEnabled(), QWizardPrivate::_q_updateButtonStates(), acceptsDrop(), QLayout::addChildWidget(), QWidgetBackingStore::addStaticWidget(), QMdiArea::addSubWindow(), QWorkspace::addWindow(), QMdiAreaPrivate::appendChild(), QApplicationPrivate::applyX11SpecificCommandLineArguments(), QPainterPrivate::attachPainterPrivate(), QCoreGraphicsPaintEngine::begin(), QX11PaintEngine::begin(), QPainter::begin(), QDirectFBWindowSurface::beginPaint(), buildSpec(), QWidgetPrivate::childAtRecursiveHelper(), QGroupBox::childEvent(), QSplitter::childEvent(), clipboardData(), QWidgetPrivate::close_helper(), QMdiSubWindow::closeEvent(), QWinInputContext::composition(), QDialog::contextMenuEvent(), create(), QXIMInputContext::create_xim(), QWidgetPrivate::createRecursively(), QEgl::createSurface(), QVGGraphicsSystem::createWindowSurface(), QGLGraphicsSystem::createWindowSurface(), QWidgetPrivate::createWinId(), destroy(), discardSyncRequest(), QApplicationPrivate::dispatchEnterLeave(), do_size_hints(), QWindowsXPStylePrivate::drawBackground(), QWindowsVistaStyle::drawComplexControl(), QWindowsXPStyle::drawComplexControl(), QGtkStyle::drawComplexControl(), QMacStyle::drawComplexControl(), QCommonStyle::drawControl(), QWindowsCEStyle::drawControl(), QMacStyle::drawControl(), QGtkStyle::drawPrimitive(), QOleDropTarget::Drop(), effectiveWinId(), QWinInputContext::enable(), QWinInputContext::endComposition(), QGraphicsProxyWidget::event(), QDialog::event(), QMdiSubWindow::event(), QMacStyle::event(), QMainWindow::event(), QApplication::event(), event(), QSizeGrip::eventFilter(), QWhatsThisPrivate::eventFilter(), QDialog::exec(), find_child(), QX11Data::findClientWindow(), QRasterWindowSurface::flush(), QWidgetBackingStore::flushPaint(), QMacStyle::focusRectPolicy(), QApplication::font(), QFbScreen::generateRects(), QClipboardWatcher::getDataInFormat(), QSplitterLayoutStruct::getWidgetSize(), QMacInputContext::globalEventProcessor(), QApplicationPrivate::globalEventProcessor(), QPixmap::grabWidget(), QWidgetPrivate::hideChildren(), QStatusBar::hideOrShow(), QGLWindowSurface::hijackWindow(), QStyleOption::init(), QMacStylePrivate::initHIThemePushButton(), QRadioButton::initStyleOption(), QStyleSheetStyle::initWidget(), QStatusBar::insertPermanentWidget(), QStatusBar::insertWidget(), QSplitterPrivate::insertWidget_helper(), QWidgetPrivate::isBackgroundInherited(), QApplicationPrivate::isBlockedByModal(), isEnabledTo(), isServerProcess(), isTransient(), isWidgetOpaque(), QScreen::isWidgetPaintOnScreen(), isWindowModified(), QMdiAreaPrivate::lastWindowAboutToBeDestroyed(), QAbstractScrollAreaPrivate::layoutChildren(), QMacStyle::layoutSpacingImplementation(), lower(), make_widget_eventUPP(), make_win_eventUPP(), QWidgetBackingStore::markDirtyOnScreen(), QWinInputContext::mouseHandler(), QSizeGrip::mouseMoveEvent(), QRadioButton::mouseMoveEvent(), QCheckBox::mouseMoveEvent(), QWidgetResizeHandler::mouseMoveEvent(), QHeaderView::mouseMoveEvent(), QSizeGrip::mousePressEvent(), QGraphicsView::mouseReleaseEvent(), move(), nativeParentWidget(), QApplication::notify(), QDialog::open(), QGLOverlayWidget::paintGL(), parseGeometry(), QMacStyle::pixelMetric(), QMdiAreaPrivate::place(), QTipLabel::placeTip(), QMacStyle::polish(), QMenu::popup(), previousInFocusChain(), QWidgetPrivate::propagatePaletteChange(), q_createNativeChildrenAndSetParent(), qDeleteQGLContext(), QDialog::QDialog(), QDirectFBWindowSurface::QDirectFBWindowSurface(), qPRCleanup(), QRollEffect::QRollEffect(), qt_aqua_get_known_size(), qt_grab_cursor(), qt_keyrelease_scanner(), qt_mac_can_clickThrough(), qt_mac_get_scale_factor(), qt_mac_is_metal(), qt_mac_unregister_widget(), qt_mac_update_intersected_gl_widgets(), qt_mac_update_widget_position(), qt_mac_updateCursorWithWidgetUnderMouse(), qt_net_update_user_time(), qt_qpa_set_cursor(), qt_show_system_menu(), qt_try_modal(), qt_win_get_existing_directory(), qt_win_set_cursor(), qt_x11_enforce_cursor(), qt_x11_wait_for_window_manager(), QtWndProc(), qWinProcessConfigRequests(), QWorkspaceChild::QWorkspaceChild(), raise(), QWinInputContext::reconvertString(), releaseDC(), repaint(), QWinInputContext::reset(), resize(), QWorkspaceChild::resizeEvent(), QWidgetPrivate::scroll_sys(), QWidgetPrivate::scrollChildren(), QApplicationPrivate::sendMouseEvent(), QWSServerPrivate::sendMouseEventUnfiltered(), sendResizeEvents(), setAttribute(), QWidgetAction::setDefaultWidget(), QComboBox::setEditable(), QWidgetPrivate::setEnabled_helper(), setFocus(), QInputContext::setFocusWidget(), QApplicationPrivate::setFocusWidget(), QFrame::setFrameStyle(), QWSWindowSurface::setGeometry(), setGeometry(), setLayoutDirection(), QWidgetPrivate::setLayoutDirection_helper(), QWidgetPrivate::setLocale_helper(), setMask(), setMaximumSize(), setMinimumSize(), QWidgetPrivate::setModal_sys(), QSplitter::setOrientation(), QProgressBar::setOrientation(), QAbstractSlider::setOrientation(), setParent(), QWidgetPrivate::setParent_sys(), QApplication::setStyle(), setStyleSheet(), QMainWindow::setUnifiedTitleAndToolBarOnMac(), QWidgetPrivate::setUpdatesEnabled_helper(), QDialog::setVisible(), QColorDialog::setVisible(), QFontDialog::setVisible(), setVisible(), QScrollArea::setWidget(), QMdiSubWindow::setWidget(), QGraphicsProxyWidgetPrivate::setWidget_helper(), setWindowFlags(), setWindowOpacity(), QWidgetPrivate::show_sys(), QWidgetPrivate::showChildren(), QDialog::showEvent(), QMdiArea::showEvent(), QDialog::showExtension(), QSystemTrayIconSys::showMessage(), QComboBox::showPopup(), QWidgetBackingStore::showYellowThing(), QMacStyle::sizeFromContents(), QSoftKeyManager::softkeySource(), stackUnder(), QWinInputContext::startComposition(), QAccessibleWidget::state(), QAccessibleMenuItem::state(), QAccessibleTitleBar::state(), QWidgetBackingStore::staticContents(), QMacStyle::subControlRect(), QKeyMapperPrivate::translateKeyEvent(), QETWidget::translateMouseEvent(), QSystemTrayIconSys::trayMessage(), QGLContext::tryVisual(), QMacStyle::unpolish(), QStyleSheetStyle::unpolish(), unsetLayoutDirection(), QWinInputContext::update(), update(), QWidgetPrivate::updateFont(), QWinInputContext::updateImeStatus(), QDirectFBWindowSurface::updateIsOpaque(), QWidgetBackingStore::updateLists(), QGraphicsProxyWidgetPrivate::updateProxyInputMethodAcceptanceFromWidget(), QStyleSheetStyle::updateStyleSheetFont(), QApplication::widgetAt(), QMacStyle::widgetSizePolicy(), QApplication::winFocus(), winId(), QApplication::x11ClientMessage(), QXIMInputContext::x11FilterEvent(), QApplication::x11ProcessEvent(), xdndEnable(), QToolBar::~QToolBar(), and ~QWidget().
|
private |
QString QWidget::toolTip | ( | ) | const |
|
inline |
Use window() instead.
Definition at line 328 of file qwidget.h.
|
inline |
Returns true if the widget is under the mouse cursor; otherwise returns false.
This value is not updated properly during drag and drop operations.
Definition at line 996 of file qwidget.h.
Referenced by QToolBar::event(), QStyleOption::init(), QRadioButton::initStyleOption(), QRadioButton::mouseMoveEvent(), QCheckBox::mouseMoveEvent(), QCommandLinkButton::paintEvent(), QVistaBackButton::paintEvent(), QDockWidgetTitleButton::paintEvent(), CloseButton::paintEvent(), qt_qpa_set_cursor(), qt_win_set_cursor(), QtWndProc(), QGraphicsItem::setCursor(), QBalloonTip::timerEvent(), and QGraphicsItem::unsetCursor().
void QWidget::ungrabGesture | ( | Qt::GestureType | gesture | ) |
Unsubscribes the widget from a given gesture type.
Definition at line 12977 of file qwidget.cpp.
Referenced by QGraphicsScenePrivate::ungrabGesture(), and ~QWidget().
void QWidget::unsetCursor | ( | ) |
Definition at line 5311 of file qwidget.cpp.
Referenced by QToolBar::event(), QHeaderView::mouseMoveEvent(), QGraphicsView::setDragMode(), and QGraphicsProxyWidgetPrivate::setWidget_helper().
void QWidget::unsetLayoutDirection | ( | ) |
Definition at line 5217 of file qwidget.cpp.
Referenced by setLayoutDirection().
void QWidget::unsetLocale | ( | ) |
Definition at line 6178 of file qwidget.cpp.
|
slot |
Updates the widget unless updates are disabled or the widget is hidden.
This function does not cause an immediate repaint; instead it schedules a paint event for processing when Qt returns to the main event loop. This permits Qt to optimize for more speed and less flicker than a call to repaint() does.
Calling update() several times normally results in just one paintEvent() call.
Qt normally erases the widget's area before the paintEvent() call. If the Qt::WA_OpaquePaintEvent widget attribute is set, the widget is responsible for painting all its pixels with an opaque color.
Definition at line 10883 of file qwidget.cpp.
Referenced by QTextEditPrivate::_q_adjustScrollbars(), QTreeViewPrivate::_q_endAnimatedOperation(), QHeaderViewPrivate::_q_layoutChanged(), QToolButtonPrivate::_q_menuTriggered(), QTextEditPrivate::_q_repaintContents(), QPlainTextEditPrivate::_q_repaintContents(), QHeaderViewPrivate::_q_sectionsRemoved(), QMenuBar::actionEvent(), QMenu::actionEvent(), QMainWindowLayout::animationFinished(), QHeaderViewPrivate::cascadingResize(), QDockWidget::changeEvent(), QLineEdit::changeEvent(), changeEvent(), QTreeView::collapse(), QTreeView::columnCountChanged(), QTreeView::currentChanged(), QAbstractItemView::currentChanged(), QAbstractItemView::dataChanged(), QScriptEdit::deleteBreakpoint(), QIconModeViewBase::doDynamicLayout(), QListModeViewBase::doStaticLayout(), QLineEdit::dragLeaveEvent(), QLineEdit::dragMoveEvent(), QLineEdit::dropEvent(), QColorWell::dropEvent(), QAbstractItemView::edit(), QWidgetEffectSourcePrivate::effectBoundingRectChanged(), QLabelPrivate::ensureTextControl(), QVistaBackButton::enterEvent(), QToolButton::enterEvent(), QDockWidgetTitleButton::enterEvent(), CloseButton::enterEvent(), QWorkspaceTitleBar::enterEvent(), QGroupBox::event(), QStatusBar::event(), QMdiSubWindow::event(), QDockWidget::event(), QSplitterHandle::event(), QTabBar::event(), QWorkspaceTitleBar::event(), QAbstractItemView::event(), event(), QAlphaWidget::eventFilter(), QWindowsStyle::eventFilter(), QMdiSubWindow::eventFilter(), QX11EmbedContainer::eventFilter(), QWorkspaceChild::eventFilter(), QTreeViewPrivate::expandOrCollapseItemAtPos(), QIconModeViewBase::filterDragLeaveEvent(), QIconModeViewBase::filterDragMoveEvent(), QIconModeViewBase::filterDropEvent(), QSidebar::focusInEvent(), QLineEdit::focusInEvent(), QComboBox::focusInEvent(), focusInEvent(), QApplicationPrivate::focusNextPrevChild_helper(), QLineEdit::focusOutEvent(), QComboBox::focusOutEvent(), focusOutEvent(), QVistaHelper::handleWinEvent(), QComboBoxPrivateContainer::hideEvent(), QMainWindowLayout::hover(), QLineEditPrivate::init(), QDateTimeEdit::keyPressEvent(), QVistaBackButton::leaveEvent(), QMDIControl::leaveEvent(), QToolButton::leaveEvent(), QMdiSubWindow::leaveEvent(), QDockWidgetTitleButton::leaveEvent(), CloseButton::leaveEvent(), QWorkspaceTitleBar::leaveEvent(), QMdi::ControllerWidget::leaveEvent(), QTreeView::mouseDoubleClickEvent(), QRadioButton::mouseMoveEvent(), QScrollBar::mouseMoveEvent(), QCheckBox::mouseMoveEvent(), QMDIControl::mouseMoveEvent(), QGroupBox::mouseMoveEvent(), QMdiSubWindow::mouseMoveEvent(), QTabBar::mouseMoveEvent(), QGraphicsView::mouseMoveEvent(), QWorkspaceTitleBar::mouseMoveEvent(), QMdi::ControllerWidget::mouseMoveEvent(), QMDIControl::mousePressEvent(), QGroupBox::mousePressEvent(), QSlider::mousePressEvent(), QMdiSubWindow::mousePressEvent(), QMenuBar::mousePressEvent(), QMenu::mousePressEvent(), QSplitterHandle::mousePressEvent(), QWorkspaceTitleBar::mousePressEvent(), QMdi::ControllerWidget::mousePressEvent(), QMDIControl::mouseReleaseEvent(), QGroupBox::mouseReleaseEvent(), QSlider::mouseReleaseEvent(), QMdiSubWindow::mouseReleaseEvent(), QSplitterHandle::mouseReleaseEvent(), QGraphicsView::mouseReleaseEvent(), QWorkspaceTitleBar::mouseReleaseEvent(), QAbstractItemView::mouseReleaseEvent(), QMdi::ControllerWidget::mouseReleaseEvent(), QTreeView::moveCursor(), QTabBar::moveTab(), QGraphicsViewPrivate::processPendingUpdates(), QSvgWidget::QSvgWidget(), qt_cleanup(), qt_mac_update_widget_position(), qt_mac_updateParentUnderAlienWidget(), QtWndProc(), QStatusBar::reformat(), QMdi::ControlContainer::removeButtonsFromMenuBar(), repaint(), QAbstractSpinBox::resizeEvent(), QHeaderViewPrivate::resizeSections(), QBBGLContext::resizeSurface(), QTreeView::rowsInserted(), QAbstractScrollArea::scrollContentsBy(), QTreeView::scrollContentsBy(), QGraphicsView::scrollContentsBy(), QIconModeViewBase::scrollContentsBy(), QTableView::scrollTo(), QWorkspaceTitleBar::setActive(), QWorkspaceChild::setActive(), QGroupBox::setAlignment(), QLineEdit::setAlignment(), QToolButton::setArrowType(), QPushButton::setAutoDefault(), QToolButton::setAutoRaise(), QWorkspace::setBackground(), QMdiArea::setBackground(), QGraphicsScene::setBackgroundBrush(), QScriptEdit::setBaseLineNumber(), QScriptEdit::setBreakpoint(), QScriptEdit::setBreakpointEnabled(), QAbstractSpinBox::setButtonSymbols(), QDateTimeEdit::setCalendarPopup(), QGroupBox::setCheckable(), QGroupBox::setChecked(), QmlJSDebugger::ToolBarColorBox::setColor(), setContentsMargins(), QTabBar::setCurrentIndex(), QPushButton::setDefault(), QCommandLinkButton::setDescription(), QLCDNumber::setDigitCount(), QTabBar::setDrawBase(), QLineEdit::setEchoMode(), QScriptEdit::setExecutionLineNumber(), QDockWidget::setFeatures(), QGroupBox::setFlat(), QPushButton::setFlat(), QGraphicsScene::setForegroundBrush(), QProgressBar::setFormat(), QComboBox::setFrame(), QLineEdit::setFrame(), QAbstractSpinBox::setFrame(), QFrame::setFrameStyle(), QDirectFbWindow::setGeometry(), setGraphicsEffect(), QAbstractItemViewPrivate::setHoverIndex(), QAbstractButton::setIcon(), QAbstractButton::setIconSize(), QTabBar::setIconSize(), QProgressBar::setInvertedAppearance(), QAbstractSlider::setInvertedAppearance(), QAbstractItemView::setItemDelegate(), QAbstractItemView::setItemDelegateForColumn(), QAbstractItemView::setItemDelegateForRow(), QComboBox::setLineEdit(), setMask(), QPushButton::setMenu(), QToolButton::setMenu(), QDial::setNotchesVisible(), QDial::setNotchTarget(), QToolBarSeparator::setOrientation(), QProgressBar::setOrientation(), QAbstractSlider::setOrientation(), QShapedPixmapWidget::setPixmap(), QLineEdit::setPlaceholderText(), QProgressBar::setRange(), QAbstractSpinBox::setReadOnly(), QLineEdit::setReadOnly(), QTableView::setRootIndex(), QComboBox::setRootModelIndex(), QLabel::setScaledContents(), QLCDNumber::setSegmentStyle(), QToolBoxButton::setSelected(), QMenu::setSeparatorsCollapsible(), QAbstractSlider::setSliderPosition(), QLCDNumber::setSmallDecimalPoint(), QApplication::setStyle(), QTabBar::setTabButton(), QTabBar::setTabEnabled(), QTabBar::setTabIcon(), QTabBar::setTabsClosable(), QTabBar::setTabTextColor(), QAbstractButton::setText(), QProgressBar::setTextDirection(), QLineEdit::setTextMargins(), QSlider::setTickInterval(), QSlider::setTickPosition(), QGroupBox::setTitle(), QToolButton::setToolButtonStyle(), QTabWidget::setUpLayout(), QDockWidgetLayout::setVerticalTitleBar(), QGraphicsProxyWidgetPrivate::setWidget_helper(), QDial::setWrapping(), QComboBoxPrivateContainer::showEvent(), QComboBox::showPopup(), QWorkspaceChild::showShaded(), QAbstractSlider::sliderChange(), QMacStylePrivate::stopAnimate(), QWidgetBackingStore::sync(), QWindowsStyle::timerEvent(), QPlastiqueStyle::timerEvent(), QMotifStyle::timerEvent(), QMainWindowLayout::timerEvent(), QWindowsVistaStylePrivate::timerEvent(), QMacStylePrivate::timerEvent(), QWellArray::updateCell(), QTreeViewPrivate::AnimatedOperation::updateCurrentValue(), QScriptEdit::updateExtraArea(), QUIKitWindow::updateGeometryAndOrientation(), QSystemTrayIconSys::updateIcon(), QGraphicsViewPrivate::updateRect(), QGraphicsView::updateScene(), QToolBoxPrivate::updateTabs(), updateWidgets(), QMdi::ControlLabel::updateWindowIcon(), QTreeView::viewportEvent(), and QX11EmbedContainer::x11Event().
|
inline |
This version updates a rectangle (x, y, w, h) inside the widget.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 1002 of file qwidget.h.
void QWidget::update | ( | const QRect & | rect | ) |
This version updates a rectangle rect inside the widget.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 10906 of file qwidget.cpp.
void QWidget::update | ( | const QRegion & | rgn | ) |
This version repaints a region rgn inside the widget.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 10944 of file qwidget.cpp.
void QWidget::updateGeometry | ( | ) |
Notifies the layout system that this widget has changed and may need to change geometry.
Call this function if the sizeHint() or sizePolicy() have changed.
For explicitly hidden widgets, updateGeometry() is a no-op. The layout system will be notified as soon as the widget is shown.
Definition at line 10372 of file qwidget.cpp.
Referenced by QLayout::activate(), QBalloonTip::balloon(), changeEvent(), QPushButton::event(), QX11EmbedContainer::eventFilter(), qt_set_windows_updateScrollBar(), QTabBar::resizeEvent(), QGroupBox::setAlignment(), QToolButton::setArrowType(), QPushButton::setAutoDefault(), QGroupBox::setCheckable(), setContentsMargins(), QCommandLinkButton::setDescription(), QGroupBox::setFlat(), QPushButton::setFlat(), QComboBox::setFrame(), QLineEdit::setFrame(), QAbstractButton::setIcon(), QAbstractButton::setIconSize(), QTabBar::setIconSize(), QComboBox::setIconSize(), QPushButton::setMenu(), QComboBox::setMinimumContentsLength(), QMenuBar::setNativeMenuBar(), QCalendarWidget::setNavigationBarVisible(), QProgressBar::setOrientation(), QAbstractSlider::setOrientation(), QSpinBox::setPrefix(), QComboBox::setSizeAdjustPolicy(), setSizePolicy(), QSpinBox::setSuffix(), QDoubleSpinBox::setSuffix(), QAbstractButton::setText(), QLineEdit::setTextMargins(), QSlider::setTickPosition(), QGroupBox::setTitle(), QToolButton::setToolButtonStyle(), QWizardHeader::setup(), QTabWidget::setUpLayout(), QScrollArea::setWidgetResizable(), QWizard::setWizardStyle(), QComboBox::showEvent(), updateWidgets(), and QX11EmbedContainer::x11Event().
|
protectedslot |
Updates the widget's micro focus.
Definition at line 11820 of file qwidget.cpp.
Referenced by QLineEditPrivate::init(), setShown(), QPlainTextEdit::wheelEvent(), and QTextEdit::wheelEvent().
|
inline |
QRegion QWidget::visibleRegion | ( | ) | const |
Returns the unobscured region where paint events can occur.
For visible widgets, this is an approximation of the area not covered by other widgets; otherwise, this is an empty region.
The repaint() function calls this function if necessary, so in general you do not need to call it.
Definition at line 8404 of file qwidget.cpp.
QString QWidget::whatsThis | ( | ) | const |
Referenced by setWhatsThis(), and QListWidgetItem::whatsThis().
|
protectedvirtual |
This event handler, for event event, can be reimplemented in a subclass to receive wheel events for the widget.
If you reimplement this handler, it is very important that you ignore() the event if you do not handle it, so that the widget's parent can interpret it.
The default implementation ignores the event.
Reimplemented in QCalendarView, QTextEdit, QGraphicsView, QComboBox, QPlainTextEdit, QTabBar, QDateTimeEdit, QSystemTrayIconSys, QMenu, QAbstractSlider, QAbstractSpinBox, QWorkspace, and QAbstractScrollArea.
Definition at line 9326 of file qwidget.cpp.
Referenced by QComboBox::addItems(), event(), setShown(), and QTabBar::wheelEvent().
|
inline |
Referenced by QWorkspacePrivate::_q_scrollBarChanged(), QCalendarWidgetPrivate::_q_yearClicked(), QSplitterPrivate::adjustPos(), QDialog::adjustPosition(), QApplicationPrivate::applyX11SpecificCommandLineArguments(), QWorkspace::cascade(), QGraphicsView::centerOn(), QMenuBar::changeEvent(), QTableView::columnMoved(), QAbstractSpinBox::contextMenuEvent(), QTreeView::currentChanged(), QWSDisplay::defineCursor(), QColumnViewPrivate::doLayout(), QTreeView::drawRow(), QLCDNumberPrivate::drawSegment(), QVistaHelper::drawTitleBar(), QLabelPrivate::ensureTextLayouted(), QGraphicsView::ensureVisible(), QFontComboBox::event(), QMdiSubWindow::event(), QWizard::event(), QWorkspace::eventFilter(), QMdiSubWindow::eventFilter(), QWorkspaceChild::eventFilter(), QScriptEdit::extraAreaPaintEvent(), QWizardPrivate::findDefaultBackgroundPixmap(), QColorDialogPrivate::init(), inputMethodQuery(), QMenu::keyPressEvent(), QMdiSubWindow::leaveEvent(), QStatusBarPrivate::messageRect(), QMdiSubWindow::minimumSizeHint(), QDialog::minimumSizeHint(), QProgressBar::minimumSizeHint(), QMenuBar::minimumSizeHint(), QCalendarWidget::minimumSizeHint(), QTabBar::minimumSizeHint(), QToolBarPrivate::mouseMoveEvent(), QMdiSubWindow::mouseMoveEvent(), QMdiSubWindow::mousePressEvent(), QMdiSubWindow::mouseReleaseEvent(), QTabBar::mouseReleaseEvent(), QRubberBand::move(), move(), QTabBar::moveTab(), QAxClientSite::OnPosRectChange(), QWorkspace::paintEvent(), QMdiSubWindow::paintEvent(), QMenuBar::paintEvent(), QMenu::paintEvent(), QWizard::paintEvent(), QTabBar::paintEvent(), QHeaderView::paintEvent(), QWizardHeader::paintEvent(), QWizardAntiFlickerWidget::paintEvent(), QColorLuminancePicker::paintEvent(), QGLOverlayWidget::paintGL(), QMdiAreaPrivate::place(), QTipLabel::placeTip(), QScriptDebuggerCodeFinderWidget::QScriptDebuggerCodeFinderWidget(), QtWndProc(), QWhatsThat::QWhatsThat(), QAccessibleTable2::rect(), QAccessibleHeader::rect(), QAccessibleItemView::rect(), QAccessibleSlider::rect(), QAccessibleDial::rect(), QAccessibleTable2HeaderCell::rect(), QTextEditPrivate::relayoutDocument(), QPlainTextEditPrivate::relayoutDocument(), QComboBoxListView::resizeEvent(), QVistaHelper::resizeEvent(), QX11EmbedContainer::resizeEvent(), QMdiSubWindow::resizeEvent(), QColorPicker::resizeEvent(), QWorkspaceChild::resizeEvent(), QAxHostWidget::resizeObject(), QExpandingLineEdit::resizeToContents(), QMdiAreaPrivate::resizeToMinimumTileSize(), QWhatsThisPrivate::say(), QColumnView::scrollTo(), QProgressDialog::setBar(), QProgressDialog::setCancelButton(), QProgressDialog::setCancelButtonText(), QmlJSDebugger::ToolBarColorBox::setColor(), setFixedHeight(), setGeometry(), QSplitter::setHandleWidth(), QProgressDialog::setLabel(), QProgressDialog::setLabelText(), setMaximumHeight(), setMaximumSize(), setMinimumHeight(), setMinimumSize(), QListView::setSelection(), QMdiSubWindowPrivate::setSizeGrip(), QWizardHeader::setup(), QProgressDialog::setValue(), QVistaHelper::setWindowPosHack(), QDial::setWrapping(), QProgressDialog::showEvent(), QWhatsThat::showEvent(), QDialog::showExtension(), QComboBox::showPopup(), QWorkspaceChild::showShaded(), QVistaBackButton::sizeHint(), QDialog::sizeHint(), QProgressDialog::sizeHint(), QMenuBar::sizeHint(), CloseButton::sizeHint(), QFileDialogListView::sizeHint(), QTableView::sizeHintForColumn(), QAbstractItemView::sizeHintForColumn(), QWorkspace::tile(), QScriptEdit::updateExtraArea(), QTableView::updateGeometries(), QListView::updateGeometries(), QExpandingLineEdit::updateMinimumWidth(), QTreeViewPrivate::updateScrollBars(), QMessageBoxPrivate::updateSize(), QMdiAreaPrivate::updateTabBarGeometry(), QTreeView::viewportEvent(), QTableView::visualRegionForSelection(), QHeaderView::visualRegionForSelection(), and windowInteractsWithPosition().
QWidget * QWidget::window | ( | ) | const |
Returns the window for this widget, i.e.
the next ancestor widget that has (or could have) a window-system frame.
If the widget is a window, the widget itself is returned.
Typical usage is changing the window title:
Definition at line 4492 of file qwidget.cpp.
Referenced by QX11EmbedContainerPrivate::acceptClient(), activateWindow(), QMainWindow::addDockWidget(), QDialog::adjustPosition(), QApplication::alert(), alert_widget(), QMacStylePrivate::animatable(), QDockAreaLayoutInfo::apply(), QGLWindowSurface::buffer(), QWindowSurface::buffer(), QXlibCursor::changeCursor(), QX11EmbedWidgetPrivate::checkActivateWindow(), checkEmbedded(), clearMask(), QApplicationPrivate::closePopup(), QUIKitSoftwareInputHandler::closeSoftwareInputPanel(), QShortcutMap::correctGraphicsWidgetContext(), QShortcutMap::correctWidgetContext(), QFileDialogPrivate::createNavServicesDialog(), QMdiArea::currentSubWindow(), destroy(), QApplicationPrivate::dispatchEnterLeave(), QX11Data::dndEnable(), QWindowsXPStylePrivate::drawBackground(), QTreeView::drawBranches(), QMacStyle::drawControl(), QVistaHelper::drawTitleBar(), QWinInputContext::enablePopupChild(), QFontComboBox::event(), QStatusBar::event(), QMdiSubWindow::event(), QAbstractButton::event(), QLabel::event(), QMdiArea::event(), QApplication::event(), QUIKitSoftwareInputHandler::eventFilter(), QWindowsStyle::eventFilter(), QWorkspace::eventFilter(), QX11EmbedContainer::eventFilter(), QAxHostWidget::eventFilter(), QCalendarWidget::eventFilter(), QMdiArea::eventFilter(), QMacStylePrivate::eventFilter(), QX11Data::findClientWindow(), findParentforPopup(), findRealWindow(), flipPoint(), QXcbWindowSurface::flush(), QRasterWindowSurface::flush(), QPushButton::focusInEvent(), QApplicationPrivate::focusNextPrevChild_helper(), QPushButton::focusOutEvent(), QWidgetPrivate::frameStrut(), getNetWmState(), QAxClientSite::GetWindowContext(), QApplicationPrivate::globalEventProcessor(), QWSDisplay::grabKeyboard(), QWSDisplay::grabMouse(), QWindowSurface::grabWidget(), QMenuBarPrivate::handleReparent(), hasFocus(), QWindowsStylePrivate::hasSeenAlt(), QWidgetPrivate::hide_sys(), QStyleOption::init(), QMenu::initStyleOption(), QKeyMapperPrivate::isADeadKey(), QApplicationPrivate::isBlockedByModal(), isInPopup(), QApplication::isLeftToRight(), isServerProcess(), QAbstractScrollAreaPrivate::layoutChildren(), QMenuBarPrivate::macDestroyMenuBar(), QCoreGraphicsPaintEngine::macDisplayColorSpace(), QMenuBarPrivate::macWidgetHasNativeMenubar(), make_widget_eventUPP(), make_win_eventUPP(), QWidgetBackingStore::markDirty(), menuItemEntry(), QToolBarPrivate::mouseMoveEvent(), QAbstractButtonPrivate::moveFocus(), QWidgetPrivate::moveRect(), QApplication::notify(), QApplicationPrivate::notify_helper(), QAxClientSite::OnPosRectChange(), QPrintDialogPrivate::openWindowsPrintDialogModally(), QWizardAntiFlickerWidget::paintEvent(), QGLOverlayWidget::paintGL(), QHeaderView::paintSection(), QMacStyle::pixelMetric(), QPlatformScreen::platformScreenForWidget(), QMenu::popup(), QWidgetPrivate::prepareToRender(), previousInFocusChain(), q_createNativeChildrenAndSetParent(), qCanAllocColors(), QDirectFBWindowSurface::QDirectFBWindowSurface(), qstring_to_xtp(), qt_aqua_guess_size(), qt_cleanup(), qt_mac_desktopSize(), qt_mac_get_scale_factor(), qt_mac_handleTabletEvent(), qt_mac_unregister_widget(), qt_mac_update_intersected_gl_widgets(), qt_mac_update_widget_position(), qt_mac_window_for(), QAxClientSite::qt_metacall(), qt_qpa_set_cursor(), qt_win_get_existing_directory(), qt_win_get_save_file_name(), qt_win_getKeyboardModifiers(), qt_win_make_OFN(), qt_win_set_cursor(), qt_win_setup_PRINTDLGEX(), QtWndProc(), QWorkspaceChild::QWorkspaceChild(), QApplication::qwsProcessEvent(), QX11EmbedContainer::QX11EmbedContainer(), QX11EmbedContainerPrivate::QX11EmbedContainerPrivate(), QXcbWindow::QXcbWindow(), QX11EmbedContainerPrivate::rejectClient(), QMdi::ControlContainer::removeButtonsFromMenuBar(), QMdiSubWindowPrivate::removeButtonsFromMenuBar(), repaint(), QWidgetPrivate::reparentFocusWidgets(), QDockAreaLayoutInfo::restoreState(), QWidgetPrivate::scrollRect(), QWSDisplay::selectCursor(), QApplicationPrivate::sendSyntheticEnterLeave(), sendXEmbedMessage(), QWorkspaceChild::setActive(), QApplication::setActiveWindow(), setAttribute(), QMenuBarPrivate::setCurrentAction(), QStackedLayout::setCurrentIndex(), QDialogPrivate::setDefault(), PvrEglWindowSurface::setDirectRegion(), setFocus(), QWSInputContext::setFocusWidget(), QApplicationPrivate::setFocusWidget(), QWidgetPrivate::setModal_sys(), setParent(), QWidgetPrivate::setParent_sys(), QDeclarativeView::setRootObject(), QmlJSDebugger::AbstractViewInspector::setShowAppOnTop(), setTabOrder(), QGtkStylePrivate::setupGtkFileChooser(), QDialog::setVisible(), QXlibWindow::setVisible(), setVisible(), QMdiSubWindowPrivate::showButtonsInMenuBar(), QMdiArea::showEvent(), QComboBox::showPopup(), QDirectFBScreen::surfaceForWidget(), QApplication::syncX(), QMacStylePrivate::timerEvent(), QWorkspaceTitleBarPrivate::titleBarState(), QAxServerBase::TranslateAcceleratorW(), QWSInputContext::translateIMQueryEvent(), QETWidget::translateWheelEvent(), QApplicationPrivate::tryModalHelper(), QWidgetBackingStore::unflushPaint(), QWSInputContext::update(), update(), QMenuBarPrivate::updateCornerWidgetToolBar(), QGLContext::updatePaintDevice(), updateRedirectedToGraphicsProxyWidget(), QWSEmbedWidgetPrivate::updateWindow(), QWorkspaceTitleBar::usesActiveColor(), QGraphicsView::viewportEvent(), QAxScriptSite::window(), QApplication::winFocus(), QX11EmbedWidget::x11Event(), QApplication::x11ProcessEvent(), xdndEnable(), QX11Data::xdndHandleDrop(), and QX11Data::xdndHandleLeave().
|
protectedvirtual |
Definition at line 12004 of file qwidget.cpp.
Referenced by event(), and QAxClientSite::translateKeyEvent().
QString QWidget::windowFilePath | ( | ) | const |
Referenced by setWindowFilePath(), and setWindowIcon().
|
inline |
Window flags are a combination of a type (e.
g. Qt::Dialog) and zero or more hints to the window system (e.g. Qt::FramelessWindowHint).
If the widget had type Qt::Widget or Qt::SubWindow and becomes a window (Qt::Window, Qt::Dialog, etc.), it is put at position (0, 0) on the desktop. If the widget is a window and becomes a Qt::Widget or Qt::SubWindow, it is put at position (0, 0) relative to its parent widget.
Definition at line 939 of file qwidget.h.
Referenced by QWorkspacePrivate::_q_updateActions(), QMdiArea::addSubWindow(), QMdiAreaPrivate::appendChild(), bypassGraphicsProxyWidget(), QRubberBand::changeEvent(), QGraphicsProxyWidgetPrivate::embedSubWindow(), QMdiSubWindow::event(), QWorkspaceChild::eventFilter(), QDialog::exec(), flipPoint(), QWSWindowSurface::flush(), getNamedAttribute(), getNetWmState(), QMdiAreaPrivate::highlightNextSubWindow(), QWorkspaceChild::internalRaise(), isPopup(), isServerProcess(), make_widget_eventUPP(), QWorkspacePrivate::maximizeWindow(), QWorkspacePrivate::minimizeWindow(), QMdiSubWindow::mouseDoubleClickEvent(), QSizeGrip::mouseMoveEvent(), QSizeGrip::mousePressEvent(), QDecorationWindows::paint(), QDecorationStyled::paint(), QDecorationDefault::paint(), QMdiSubWindow::paintEvent(), QDialog::QDialog(), qstring_to_xtp(), qt_mac_QStringListToNSMutableArrayVoid(), qt_mac_unregister_widget(), qt_mac_updateToolBarButtonHint(), qt_show_system_menu(), qt_wince_maximize(), qt_wince_unmaximize(), qt_x11_recreateWidget(), QtWndProc(), QWizard::QWizard(), QWorkspaceChild::QWorkspaceChild(), QWorkspaceTitleBar::QWorkspaceTitleBar(), QApplication::qwsProcessEvent(), QXcbWindow::QXcbWindow(), QMdiAreaPrivate::rearrange(), QDecorationStyled::region(), QDecorationWindows::region(), QDecorationDefault::region(), QWSDisplay::repaintRegion(), setParent(), QmlJSDebugger::AbstractViewInspector::setShowAppOnTop(), QMdiSubWindowPrivate::setSizeGrip(), QMainWindow::setUnifiedTitleAndToolBarOnMac(), QMdiArea::setupViewport(), QMdi::ControlContainer::showButtonsInMenuBar(), QMdiSubWindow::showEvent(), QWorkspacePrivate::showWindow(), QAccessibleWidget::state(), QWorkspace::tile(), QWorkspaceChild::titleBarDoubleClicked(), QDecorationStyled::titleBarHeight(), QWorkspaceChild::updateMask(), updateRedirectedToGraphicsProxyWidget(), QMdiAreaPrivate::windowStaysOnTop(), and QApplication::winFocus().
QIcon QWidget::windowIcon | ( | ) | const |
Referenced by QMessageBox::about(), QMdiAreaPrivate::appendChild(), QMdi::ControlContainer::ControlContainer(), QVistaHelper::drawTitleBar(), QMdiSubWindow::event(), QMdiArea::eventFilter(), QMdiSubWindow::QMdiSubWindow(), QMdiAreaPrivate::setViewMode(), QMdiSubWindow::setWidget(), setWindowTitle(), QVistaHelper::titleOffset(), and QMdi::ControlLabel::updateWindowIcon().
QString QWidget::windowIconText | ( | ) | const |
Referenced by QtWndProc(), setWindowIcon(), setWindowIconText(), and setWindowModified().
Qt::WindowModality QWidget::windowModality | ( | ) | const |
Referenced by QWidgetPrivate::inheritStyle(), QDialog::open(), QColorDialog::setVisible(), and setWindowModality().
qreal QWidget::windowOpacity | ( | ) | const |
Referenced by testAttribute_helper(), and QComboBoxPrivate::updateViewContainerPaletteAndOpacity().
QString QWidget::windowRole | ( | ) | const |
Returns the window's role, or an empty string.
Definition at line 6483 of file qwidget.cpp.
Qt::WindowStates QWidget::windowState | ( | ) | const |
Returns the current window state.
The window state is a OR'ed combination of Qt::WindowState: Qt::WindowMinimized, Qt::WindowMaximized, Qt::WindowFullScreen, and Qt::WindowActive.
Definition at line 3086 of file qwidget.cpp.
Referenced by QSizeGripPrivate::_q_showIfNotHidden(), activateWindow(), QDecoration::buildSysMenu(), QMdiSubWindow::changeEvent(), QMdiSubWindowPrivate::ensureWindowState(), QDialog::event(), QMainWindow::event(), QMeeGoGraphicsSystemSwitchHandler::eventFilter(), QWorkspaceChild::eventFilter(), getNamedAttribute(), QApplicationPrivate::globalEventProcessor(), QVistaHelper::mouseMoveEvent(), QVistaHelper::mousePressEvent(), QDecorationStyled::paint(), QDecorationDefault::paint(), QtWndProc(), QDecorationWindows::region(), QDecorationDefault::region(), QDecoration::regionClicked(), QDecoration::regionDoubleClicked(), QBBScreen::resizeWindows(), restoreGeometry(), saveGeometry(), QMdiSubWindowPrivate::setActive(), QWorkspace::setActiveWindow(), QDialog::setVisible(), setVisible(), QDialog::showEvent(), showFullScreen(), showMaximized(), QWorkspaceChild::showMaximized(), showMinimized(), QWorkspaceChild::showMinimized(), showNormal(), QWorkspaceChild::showNormal(), QWorkspaceTitleBarPrivate::titleBarState(), and QWorkspaceChild::updateMask().
QWindowSurface * QWidget::windowSurface | ( | ) | const |
Returns the QWindowSurface this widget will be drawn into.
This function is under development and subject to change.
Definition at line 12819 of file qwidget.cpp.
Referenced by QWidgetBackingStore::beginPaint(), PvrEglScreenSurfaceFunctions::createNativeWindow(), QXcbWindow::handleExposeEvent(), QApplicationPrivate::isAlien(), QWidgetPrivate::paintSiblingsRecursive(), QWidgetBackingStore::QWidgetBackingStore(), setAttribute(), QDirectFbWindow::setGeometry(), setParent(), QMainWindow::setUnifiedTitleAndToolBarOnMac(), QDirectFBScreen::surfaceForWidget(), QWidgetBackingStore::sync(), QETWidget::translateRegionEvent(), visibleRegion(), QDirectFBScreen::windowForWidget(), and QWindowSurface::~QWindowSurface().
QString QWidget::windowTitle | ( | ) | const |
Referenced by QDockWidget::changeEvent(), QToolBar::changeEvent(), QUnixPrintWidgetPrivate::checkFields(), constructWindowTitleFromFilePath(), QMdiSubWindow::event(), QMdiSubWindow::eventFilter(), QWorkspaceChild::eventFilter(), QWorkspaceChild::iconWidget(), QAxClientSite::Invoke(), QToolBar::isAreaAllowed(), QMessageBox::keyPressEvent(), QTornOffMenu::QTornOffMenu(), QtWndProc(), QColorDialog::setVisible(), QMdiSubWindow::setWidget(), setWindowModified(), setWindowTitle(), tabTextFor(), QAccessibleMenu::text(), and QAccessibleMdiSubWindow::text().
|
inline |
Returns the window type of this widget.
This is identical to windowFlags() & Qt::WindowType_Mask.
Definition at line 937 of file qwidget.h.
Referenced by activateWindow(), QBBScreen::addWindow(), QApplicationPrivate::applyX11SpecificCommandLineArguments(), backgroundRole(), QCoreGraphicsPaintEngine::begin(), clearFocus(), QApplication::closeAllWindows(), QApplicationPrivate::closePopup(), QShortcutMap::correctWidgetContext(), create(), QWidgetPrivate::create_sys(), QGLGraphicsSystem::createWindowSurface(), QApplication::desktop(), destroy(), DllCanUnloadNow(), QApplicationPrivate::enterModal(), QMacStyle::event(), QApplication::event(), event(), QX11Data::findClientWindow(), findRealWindow(), findWindowThatShouldDisplayMenubar(), focusNextPrevChild(), QApplicationPrivate::focusNextPrevChild_helper(), QApplicationPrivate::globalEventProcessor(), handle_xdnd_position(), QWidgetPrivate::init(), isTransient(), keyPressEvent(), QAbstractScrollAreaPrivate::layoutChildren(), QApplicationPrivate::leaveModal(), make_win_eventUPP(), QX11Data::motifdndObtainData(), mousePressEvent(), QWindowsXPStyle::pixelMetric(), QWindowsStyle::pixelMetric(), QMacStyle::pixelMetric(), QWidgetPrivate::pointToRect(), previousInFocusChain(), q_createNativeChildrenAndSetParent(), qt_event_activate_timer_callbk(), qt_mac_grabScreenRect_10_3(), qt_mac_is_macdrawer(), qt_mac_is_macsheet(), qt_sizegrip_topLevelWidget(), qt_xdnd_send_leave(), QtWndProc(), QApplication::qwsProcessEvent(), QMdiAreaPrivate::resizeToMinimumTileSize(), setDisabled(), setFocus(), setParent(), QBBWindow::setScreen(), QApplication::setStyle(), setVisible(), QFocusFrame::setWidget(), QWidgetPrivate::setWinId(), QCoreFuriCuri::timerEvent(), QApplication::topLevelWidgets(), topLevelWidgets(), QETWidget::translateMouseEvent(), unstylable(), updateRedirectedToGraphicsProxyWidget(), QApplication::winFocus(), QApplication::x11ProcessEvent(), xdndEnable(), and xdndObtainData().
|
protectedvirtual |
This special event handler can be reimplemented in a subclass to receive native Windows events which are passed in the message parameter.
In your reimplementation of this function, if you want to stop the event being handled by Qt, return true and set result to the value that the window procedure should return. If you return false, this native event is passed back to Qt, which translates the event into a Qt event and sends it to the widget.
Reimplemented in QETWidget, QWizard, QAxHostWidget, QSystemTrayIconSys, QSizeGrip, and QSystemTrayIconSys.
Definition at line 9941 of file qwidget.cpp.
Referenced by QSystemTrayIconSys::findTrayGeometry(), QVistaHelper::leftMargin(), setShown(), QSizeGrip::winEvent(), QSystemTrayIconSys::winEvent(), QAxHostWidget::winEvent(), QWizard::winEvent(), and QETWidget::winEvent().
WId QWidget::winId | ( | ) | const |
Returns the window system identifier of the widget.
Portable in principle, but if you use it you are probably about to do something non-portable. Be careful.
If a widget is non-native (alien) and winId() is invoked on it, that widget will be provided a native handle.
On Mac OS X, the type returned depends on which framework Qt was linked against. If Qt is using Carbon, the {WId} is actually an HIViewRef. If Qt is using Cocoa, {WId} is a pointer to an NSView.
This value may change at run-time. An event with type QEvent::WinIdChange will be sent to the widget following a change in window system identifier.
Definition at line 2557 of file qwidget.cpp.
Referenced by QAxClientSite::activateObject(), QAxServerBase::ActiveXProc(), QWSDisplay::addProperty(), QSystemTrayIconSys::addToTray(), alert_widget(), axc_FilterProc(), QWSDisplay::convertSelection(), QEgl::createSurface(), QWSDisplay::destroyRegion(), QX11EmbedWidget::embedInto(), QAxScriptSite::EnableModeless(), QTraceWindowSurface::endPaint(), ShivaVGWindowSurfacePrivate::ensureContext(), QAxHostWidget::event(), QVistaHelper::eventFilter(), find_trans_colors(), QSystemTrayIconSys::findIconGeometry(), getDC(), QAxClientSite::GetIDsOfNames(), QWSDisplay::getProperty(), QAxScriptSite::GetWindow(), QAxClientSite::GetWindow(), QAxClientSite::GetWindowContext(), QWSDisplay::grabKeyboard(), QWSDisplay::grabMouse(), QAInterface::hiObject(), QMainWindowLayout::insertIntoMacToolbar(), make_widget_eventUPP(), menuItemEntry(), QX11Data::motifdndHandle(), QSizeGrip::mouseMoveEvent(), QSizeGrip::mousePressEvent(), QWSDisplay::moveRegion(), QWSDisplay::nameRegion(), QBBNativeInterface::nativeResourceForWidget(), QEgl::nativeWindow(), QSystemTrayIconSys::paintEvent(), QGLOverlayWidget::paintGL(), parseGeometry(), q_createNativeChildrenAndSetParent(), qax_winEventFilter(), qCanAllocColors(), qDeleteQGLContext(), QSystemTrayIconSys::QSystemTrayIconSys(), qt_mac_checkForNativeSizeGrip(), qt_mac_get_widget_rgn(), qt_mac_update_widget_position(), QAxClientSite::qt_metacall(), qt_tablet_init(), qt_tablet_init_wce(), qt_win_get_existing_directory(), qt_win_get_save_file_name(), qt_win_make_OFN(), qt_win_setup_PRINTDLGEX(), qt_wince_maximize(), qt_wince_unmaximize(), QMainWindowLayout::qtoolbarInHIToolbarHandler(), QtWndProc(), QX11EmbedContainer::QX11EmbedContainer(), QX11EmbedWidget::QX11EmbedWidget(), QXcbWindow::QXcbWindow(), releaseDC(), QWSDisplay::removeProperty(), QWSDisplay::repaintRegion(), QWSDisplay::requestFocus(), QAxHostWidget::resizeObject(), QAlphaWidget::run(), screenForDevice(), QWSDisplay::sendIMResponse(), QWSDisplay::sendIMUpdate(), QWSDisplay::setAltitude(), setDisabledStyle(), QVistaHelper::setDWMTitleBar(), QWSInputContext::setFocusWidget(), QWSDisplay::setOpacity(), QWSDisplay::setProperty(), QWSDisplay::setSelectionOwner(), QVistaHelper::setTitleBarIconAndCaptionVisible(), QGtkStylePrivate::setupGtkFileChooser(), setVisible(), QVistaHelper::setWindowPosHack(), QMessageBox::showEvent(), QSystemTrayIconSys::showMessage(), QAxClientSite::TranslateAccelerator(), QWSInputContext::translateIMQueryEvent(), QSystemTrayIconSys::trayMessage(), QWindowsVistaStylePrivate::treeViewHelper(), QWSInputContext::update(), QGLContextPrivate::updateFormatVersion(), QGLContext::updatePaintDevice(), QWSEmbedWidgetPrivate::updateWindow(), QWSDisplay::Data::waitForRegionAck(), QWSDisplay::Data::waitForRegionEvents(), QMenuBarPrivate::wceCreateMenuBar(), QX11EmbedWidget::x11Event(), and QX11EmbedWidget::~QX11EmbedWidget().
int QWidget::x | ( | ) | const |
Referenced by QAbstractScrollAreaPrivate::_q_hslide(), QWorkspacePrivate::_q_scrollBarChanged(), QCalendarWidgetPrivate::_q_yearClicked(), QAxClientSite::activateObject(), QWorkspace::addWindow(), QPushButtonPrivate::adjustedMenuPosition(), QWorkspace::arrangeIcons(), QMenuBarPrivate::calcActionRects(), QWorkspace::cascade(), QSplitter::closestLegalPosition(), QWidgetPrivate::createTLExtra(), QColumnViewPrivate::doLayout(), QTreeView::drawRow(), QX11EmbedWidget::embedInto(), QPlainTextEditPrivate::ensureCursorVisible(), QScrollArea::ensureVisible(), QAxHostWidget::event(), QWorkspace::eventFilter(), QWorkspacePrivate::insertIcon(), QMainWindowLayout::itemAt(), QTreeViewPrivate::itemDecorationAt(), QMenu::keyPressEvent(), QGraphicsView::mapFromScene(), QGraphicsView::mapToScene(), QGraphicsViewPrivate::mapToScene(), QStatusBarPrivate::messageRect(), move(), QVistaBackButton::paintEvent(), QTableView::paintEvent(), QWizardHeader::paintEvent(), QRollEffect::paintEvent(), QGLOverlayWidget::paintGL(), QWidgetPrivate::paintSiblingsRecursive(), parseGeometry(), QWorkspacePrivate::place(), QWorkspaceChild::QWorkspaceChild(), read_bool_env_var(), repaint(), QRubberBand::resize(), resize(), QScriptEdit::resizeEvent(), QColorPicker::resizeEvent(), QAxHostWidget::resizeObject(), QRollEffect::scroll(), QTableView::scrollTo(), QLineEdit::selectionStart(), setBaseSize(), QColorPicker::setCol(), QWSDisplay::setCursorPosition(), setDisabled(), QDockWidget::setFloating(), setSizeIncrement(), QWhatsThat::showEvent(), QComboBox::showPopup(), QMainWindowLayout::takeAt(), QTableView::timerEvent(), QTreeView::timerEvent(), update(), QMenuPrivate::updateActionRects(), QMenuBarPrivate::updateGeometries(), QWorkspacePrivate::updateWorkspace(), QTreeView::visualRect(), and windowInteractsWithPosition().
|
protectedvirtual |
This special event handler can be reimplemented in a subclass to receive native X11 events passed in the event parameter.
In your reimplementation of this function, if you want to stop Qt from handling the event, return true. If you return false, this native event is passed back to Qt, which translates it into a Qt event and sends it to the widget.
Reimplemented in QGLOverlayWidget, QSystemTrayIconSys, QX11EmbedContainer, and QX11EmbedWidget.
Definition at line 9969 of file qwidget.cpp.
Referenced by setShown(), QX11EmbedWidget::x11Event(), QX11EmbedContainer::x11Event(), QSystemTrayIconSys::x11Event(), and QApplication::x11ProcessEvent().
const QX11Info & QWidget::x11Info | ( | ) | const |
Returns information about the configuration of the X display used to display the widget.
Definition at line 3009 of file qwidget_x11.cpp.
Referenced by QGLContextPrivate::bindTextureFromNativePixmap(), QEgl::createSurface(), QX11EmbedContainer::discardClient(), QX11EmbedContainer::embedClient(), QX11EmbedWidget::embedInto(), QX11EmbedWidget::event(), QX11EmbedContainer::event(), QX11EmbedWidget::eventFilter(), QX11EmbedContainer::eventFilter(), QRasterWindowSurface::flush(), QX11GLWindowSurface::grabWidget(), QX11WindowSurface::grabWidget(), QX11EmbedContainer::hideEvent(), QDesktopWidgetPrivate::init(), QSizeGrip::mousePressEvent(), QGLOverlayWidget::paintGL(), qCanAllocColors(), QRasterWindowSurface::QRasterWindowSurface(), qstring_to_xtp(), qt_change_net_wm_state(), qt_format_to_attrib_list(), QX11EmbedContainer::QX11EmbedContainer(), QX11EmbedWidget::QX11EmbedWidget(), QX11WindowSurface::QX11WindowSurface(), QX11EmbedContainerPrivate::rejectClient(), QX11EmbedContainer::resizeEvent(), QWhatsThisPrivate::say(), QX11WindowSurface::setGeometry(), QX11EmbedContainer::showEvent(), QNativeImage::systemFormat(), QApplication::x11ClientMessage(), QX11EmbedWidget::x11Event(), QX11EmbedContainer::x11Event(), QApplication::x11ProcessEvent(), QX11EmbedContainer::~QX11EmbedContainer(), and QX11EmbedWidget::~QX11EmbedWidget().
Qt::HANDLE QWidget::x11PictureHandle | ( | ) | const |
Returns the X11 Picture handle of the widget for XRender support.
Use of this function is not portable. This function will return 0 if XRender support is not compiled into Qt, if the XRender extension is not supported on the X11 display, or if the handle could not be created.
Definition at line 3045 of file qwidget_x11.cpp.
Referenced by QX11PaintEngine::begin().
int QWidget::y | ( | ) | const |
Referenced by QWorkspacePrivate::_q_scrollBarChanged(), QAbstractScrollAreaPrivate::_q_vslide(), QCalendarWidgetPrivate::_q_yearClicked(), QAxClientSite::activateObject(), QWorkspace::addWindow(), QPushButtonPrivate::adjustedMenuPosition(), QWorkspace::arrangeIcons(), QMenuBarPrivate::calcActionRects(), QWorkspace::cascade(), QTreeViewPrivate::coordinateForItem(), QTreeView::drawRow(), QTreeView::drawTree(), QAxHostWidget::event(), QWorkspace::eventFilter(), QMenuBar::eventFilter(), QTreeViewPrivate::firstVisibleItem(), QWorkspacePrivate::insertIcon(), QMenu::keyPressEvent(), move(), QVistaBackButton::paintEvent(), QTableView::paintEvent(), QWizardHeader::paintEvent(), QRollEffect::paintEvent(), QColorLuminancePicker::paintEvent(), QGLOverlayWidget::paintGL(), parseGeometry(), QWorkspacePrivate::place(), QMenu::popup(), QMenuBarPrivate::popupAction(), QWorkspaceChild::QWorkspaceChild(), repaint(), QRubberBand::resize(), resize(), QColorPicker::resizeEvent(), QAxHostWidget::resizeObject(), QRollEffect::scroll(), QTableView::scrollTo(), QTreeView::scrollTo(), QColorPicker::setCol(), QWSDisplay::setCursorPosition(), setDisabled(), QDockWidget::setFloating(), QCheckBox::setTristate(), QWhatsThat::showEvent(), QTableView::timerEvent(), update(), QMenuPrivate::updateActionRects(), QWorkspacePrivate::updateWorkspace(), QTreeView::visualRect(), and windowInteractsWithPosition().
|
friend |
Definition at line 81 of file qwindowsurface_qws.cpp.
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
Definition at line 749 of file qwidget.h.
Referenced by QMenu::initStyleOption(), and QHeaderView::sectionSizeFromContents().
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
Definition at line 748 of file qwidget.h.
Referenced by QBalloonTip::balloon(), QWizardPrivate::findDefaultBackgroundPixmap(), QLabel::paintEvent(), QGraphicsView::paintEvent(), QColorLuminancePicker::paintEvent(), QScriptBreakpointsWidgetPrivate::pixmap(), QWidgetEffectSourcePrivate::pixmap(), QAbstractItemViewPrivate::renderToPixmap(), QGraphicsView::resetCachedContent(), QMessageBox::setIcon(), QLabel::setPixmap(), QWizardHeader::setup(), QWorkspacePrivate::showMaximizeControls(), and QMessageBoxPrivate::standardIcon().
|
friend |
|
friend |
|
friend |
|
friend |
Definition at line 765 of file qwidget.h.
Referenced by QWidgetPrivate::inheritStyle(), setStyle(), and setStyleSheet().
|
friend |
Definition at line 858 of file qapplication_mac.mm.
|
friend |
Definition at line 490 of file qmacstyle_mac.mm.
Definition at line 419 of file qwidget_mac.mm.
Definition at line 380 of file qwidget_mac.mm.
Definition at line 448 of file qwidget_mac.mm.
|
friend |
Definition at line 484 of file qwidget_mac.mm.
Referenced by clearMask(), QToolBar::event(), QMenuPrivate::hideMenu(), QComboBox::hidePopup(), QRubberBand::QRubberBand(), and QTipLabel::timerEvent().
|
friend |
Definition at line 1508 of file qapplication_x11.cpp.
|
friend |
Definition at line 1520 of file qapplication_x11.cpp.
|
friend |
Definition at line 12915 of file qwidget.cpp.
|
friend |
Definition at line 325 of file qegl_x11.cpp.
|
friend |
Definition at line 12920 of file qwidget.cpp.
Referenced by QWidgetEffectSourcePrivate::draw(), QWidgetPrivate::init(), QSizeGrip::mouseMoveEvent(), QSizeGrip::mousePressEvent(), QFocusFrame::paintEvent(), repaint(), and update().
|
friend |
Definition at line 782 of file qwidget.h.
Referenced by QMainWindow::setUnifiedTitleAndToolBarOnMac().
|
friend |
|
friend |
|
friend |
Definition at line 771 of file qwidget.h.
Referenced by setGraphicsEffect().
|
friend |
|
friend |
|
friend |
|
related |
Synonym for QList<QWidget *>.
|
friend |
|
friend |
|
friend |
Definition at line 786 of file qwidget.h.
Referenced by QETWidget::repaintDecoration(), and QETWidget::updateRegion().
|
friend |
|
friend |
|
related |
Platform dependent window identifier.
Referenced by QMacNativeWidget::QMacNativeWidget(), and QMacCocoaViewContainer::setCocoaView().
|
private |
whether drop events are enabled for this widget
Setting this property to true announces to the system that this widget may be able to accept drop events.
If the widget is the desktop (windowType() == Qt::Desktop), this may fail if another application is using the desktop; you can call acceptDrops() to test if this occurs.
By default, this property is false.
Definition at line 197 of file qwidget.h.
Referenced by acceptsDrop(), QGraphicsProxyWidget::dragMoveEvent(), QIconModeViewBase::filterStartDrag(), findRealWindow(), handle_xdnd_position(), QX11Data::motifdndHandle(), QApplication::notify(), qt_xdnd_send_leave(), and xdndObtainData().
|
private |
the widget's description as seen by assistive technologies
By default, this property contains an empty string.
Definition at line 214 of file qwidget.h.
Referenced by QAccessibleWidget::text().
|
private |
the widget's name as seen by assistive technologies
This property is used by accessible clients to identify, find, or announce the widget for accessible clients.
By default, this property contains an empty string.
Definition at line 213 of file qwidget.h.
Referenced by QAccessibleButton::text(), QAccessibleWidget::text(), QAccessibleDisplay::text(), and QAccessibleDial::text().
|
private |
whether the widget background is filled automatically
If enabled, this property will cause Qt to fill the background of the widget before invoking the paint event. The color used is defined by the QPalette::Window color role from the widget's palette.
In addition, Windows are always filled with QPalette::Window, unless the WA_OpaquePaintEvent or WA_NoSystemBackground attributes are set.
This property cannot be turned off (i.e., set to false) if a widget's parent has a static gradient for its background.
By default, this property is false.
Definition at line 218 of file qwidget.h.
Referenced by make_widget_eventUPP(), QStyleSheetStyle::polish(), and QDirectFBWindowSurface::updateIsOpaque().
|
private |
the base size of the widget
The base size is used to calculate a proper widget size if the widget defines sizeIncrement().
By default, for a newly-created widget, this property contains a size with zero width and height.
|
private |
the bounding rectangle of the widget's children
Hidden children are excluded.
By default, for a widget with no children, this property contains a rectangle with zero width and height located at the origin.
Definition at line 169 of file qwidget.h.
Referenced by QMdiAreaPrivate::updateScrollBars().
|
private |
the combined region occupied by the widget's children
Hidden children are excluded.
By default, for a widget with no children, this property contains an empty region.
|
private |
how the widget shows a context menu
The default value of this property is Qt::DefaultContextMenu, which means the contextMenuEvent() handler is called. Other values are Qt::NoContextMenu, Qt::PreventContextMenu, Qt::ActionsContextMenu, and Qt::CustomContextMenu. With Qt::CustomContextMenu, the signal customContextMenuRequested() is emitted.
Definition at line 189 of file qwidget.h.
Referenced by QtWndProc().
|
private |
the cursor shape for this widget
The mouse cursor will assume this shape when it's over this widget. See the list of predefined cursor objects for a range of useful shapes.
An editor widget might use an I-beam cursor:
If no cursor has been set, or after a call to unsetCursor(), the parent's cursor is used.
By default, this property contains a cursor with the Qt::ArrowCursor shape.
Some underlying window implementations will reset the cursor if it leaves a widget even if the mouse is grabbed. If you want to have a cursor set for all widgets, even when outside the window, consider QApplication::setOverrideCursor().
Definition at line 183 of file qwidget.h.
Referenced by QTextBrowserPrivate::_q_highlightLink(), QGraphicsViewPrivate::_q_setViewportCursor(), QApplicationPrivate::dispatchEnterLeave(), QWidgetResizeHandler::doResize(), effectiveState(), QWidgetResizeHandler::eventFilter(), QWidgetResizeHandler::keyPressEvent(), parseGeometry(), QGuiEventDispatcherWin32::processEvents(), qt_grab_cursor(), qt_mac_setMouseGrabCursor(), qt_mac_updateCursorWithWidgetUnderMouse(), qt_qpa_set_cursor(), qt_win_set_cursor(), qt_x11_enforce_cursor(), QDeclarativeTextInputPrivate::sendMouseEventToInputContext(), QGraphicsProxyWidgetPrivate::setWidget_helper(), QETWidget::translateMouseEvent(), and unsetLayoutDirection().
|
private |
Definition at line 815 of file qwidget.h.
Referenced by QScriptBreakpointsWidgetPrivate::_q_onNewBreakpointRequest(), QWidgetBackingStore::addDirtyWidget(), QWidgetPrivate::childAtRecursiveHelper(), QSidebar::clicked(), QWidgetPrivate::clipToEffectiveMask(), QWidgetPrivate::close_helper(), QApplication::closeAllWindows(), contentsRect(), create(), QApplicationPrivate::dispatchEnterLeave(), do_size_hints(), QAbstractItemViewPrivate::editor(), QX11EmbedContainer::embedClient(), event(), QSystemTrayIconSys::findIconGeometry(), findRealWindow(), QWidgetPrivate::frameStrut(), functor(), getNetWmState(), QSystemTrayIconSys::getSysTrayVisualInfo(), QX11EmbedContainer::hideEvent(), QWidgetPrivate::inheritStyle(), QWidgetPrivate::init(), QWidgetPrivate::isAboutToShow(), QWidgetPrivate::isBackgroundInherited(), QApplicationPrivate::isBlockedByModal(), isFullScreen(), isMaximized(), isMinimized(), QWidgetPrivate::isOverlapped(), isServerProcess(), QListWidget::items(), QTableWidget::items(), QTextBrowser::loadResource(), make_widget_eventUPP(), make_win_eventUPP(), mapFromParent(), mapToParent(), move(), overrideWindowFlags(), overrideWindowState(), QWidgetPrivate::paintSiblingsRecursive(), QWidgetPrivate::pointToRect(), QWidgetPrivate::propagatePaletteChange(), q_createNativeChildrenAndSetParent(), qt_cleanup(), qt_grab_cursor(), qt_mac_posInWindow(), qt_mac_update_widget_position(), qt_qwidget_data(), QX11EmbedWidget::QX11EmbedWidget(), repaint(), resize(), QWidgetPrivate::resolveFont(), QWidgetPrivate::resolvePalette(), QHeaderView::restoreState(), QSplitter::saveState(), QFileDialog::saveState(), QHeaderView::saveState(), QMainWindow::saveState(), QWidgetPrivate::scroll_sys(), QWidgetPrivate::scrollChildren(), QWidgetPrivate::sendPendingMoveAndResizeEvents(), QApplicationPrivate::sendSyntheticEnterLeave(), sendXEmbedMessage(), setAttribute(), setContentsMargins(), setContextMenuPolicy(), QScriptDebuggerCodeWidget::setCurrentScript(), setDisabled(), setFocusPolicy(), setForegroundRole(), setGeometry(), setMask(), setMinimumSize(), QWidgetPrivate::setPalette_helper(), setVisible(), setWindowFlags(), setWindowModality(), QWidgetPrivate::setWinId(), QWidgetPrivate::show_helper(), QSidebar::showContextMenu(), QX11EmbedContainer::showEvent(), QAbstractItemView::startDrag(), QWidgetPrivate::subtractOpaqueSiblings(), QWidgetBackingStore::topLevelRect(), update(), QAbstractItemViewPrivate::updateEditorData(), QWidgetPrivate::updateFont(), QStyleSheetStyle::updateStyleSheetFont(), windowState(), winId(), QApplication::x11ProcessEvent(), QX11Data::xdndHandleDrop(), QX11Data::xdndHandleEnter(), QX11Data::xdndHandleSelectionRequest(), and QX11Data::xdndMimeConvertToFormat().
|
private |
whether the widget is enabled
In general an enabled widget handles keyboard and mouse events; a disabled widget does not. An exception is made with QAbstractButton.
Some widgets display themselves differently when they are disabled. For example a button might draw its label grayed out. If your widget needs to know when it becomes enabled or disabled, you can use the changeEvent() with type QEvent::EnabledChange.
Disabling a widget implicitly disables all its children. Enabling respectively enables all child widgets unless they have been explicitly disabled.
By default, this property is true.
Definition at line 157 of file qwidget.h.
Referenced by QTreeView::drawRow(), QScriptEdit::extraAreaMouseEvent(), QScriptEdit::extraAreaPaintEvent(), QListView::paintEvent(), QPlainTextEdit::setCenterOnScroll(), QMainWindow::setDockNestingEnabled(), QMdiArea::setDocumentMode(), QTabBar::setDocumentMode(), QTabBar::setExpanding(), QDialog::setSizeGripEnabled(), and QTabBar::setTabEnabled().
|
private |
whether this widget (or its focus proxy) has the keyboard input focus
By default, this property is false.
Definition at line 188 of file qwidget.h.
Referenced by QWorkspacePrivate::activateWindow(), QAxHostWidget::focusInEvent(), QWorkspacePrivate::hideChild(), QWorkspacePrivate::minimizeWindow(), and QListView::paintEvent().
|
private |
the way the widget accepts keyboard focus
The policy is Qt::TabFocus if the widget accepts keyboard focus by tabbing, Qt::ClickFocus if the widget accepts focus by clicking, Qt::StrongFocus if it accepts both, and Qt::NoFocus (the default) if it does not accept focus at all.
You must enable keyboard focus for a widget if it processes keyboard events. This is normally done from the widget's constructor. For instance, the QLineEdit constructor calls setFocusPolicy(Qt::StrongFocus).
If the widget has a focus proxy, then the focus policy will be propagated to it.
Definition at line 187 of file qwidget.h.
Referenced by QGroupBoxPrivate::_q_fixFocus(), QAccessibleToolButton::actionCount(), QAxServerBase::ActiveXProc(), QLabel::event(), QGraphicsProxyWidgetPrivate::findFocusChild(), QApplicationPrivate::focusNextPrevChild_helper(), QWidgetPrivate::frameStrut(), QX11EmbedWidgetPrivate::getFocusWidget(), QAxServerBase::internalActivate(), iWantTheFocus(), QtWndProc(), QApplication::qwsProcessEvent(), QMdiSubWindowPrivate::restoreFocus(), QWorkspaceChild::setActive(), QMenuPrivate::setCurrentAction(), QMdiSubWindowPrivate::setFocusWidget(), setTabOrder(), QDialog::setVisible(), QApplicationPrivate::shouldSetFocus(), QAccessibleWidget::state(), QAccessibleTabBar::state(), and QAxServerBase::TranslateAcceleratorW().
|
inlineprivate |
the font currently set for the widget
This property describes the widget's requested font. The font is used by the widget's style when rendering standard components, and is available as a means to ensure that custom widgets can maintain consistency with the native platform's look and feel. It's common that different platforms, or different styles, define different fonts for an application.
When you assign a new font to a widget, the properties from this font are combined with the widget's default font to form the widget's final font. You can call fontInfo() to get a copy of the widget's final font. The final font is also used to initialize QPainter's font.
The default depends on the system environment. QApplication maintains a system/theme font which serves as a default for all widgets. There may also be special font defaults for certain types of widgets. You can also define default fonts for widgets yourself by passing a custom font and the name of a widget to QApplication::setFont(). Finally, the font is matched against Qt's font database to find the best match.
QWidget propagates explicit font properties from parent to child. If you change a specific property on a font and assign that font to a widget, that property will propagate to all the widget's children, overriding any system defaults for that property. Note that fonts by default don't propagate to windows (see isWindow()) unless the Qt::WA_WindowPropagation attribute is enabled.
QWidget's font propagation is similar to its palette propagation.
The current style, which is used to render the content of all standard Qt widgets, is free to choose to use the widget font, or in some cases, to ignore it (partially, or completely). In particular, certain styles like GTK style, Mac style, Windows XP, and Vista style, apply special modifications to the widget font to match the platform's native look and feel. Because of this, assigning properties to a widget's font is not guaranteed to change the appearance of the widget. Instead, you may choose to apply a styleSheet .
Definition at line 181 of file qwidget.h.
Referenced by QXIMInputContext::createICData(), QPainter::initFrom(), QWindowsVistaStyle::polish(), qt_aqua_get_known_size(), QStyleSheetStyle::setPalette(), QCleanlooksStyle::subControlRect(), QGtkStyle::subControlRect(), QWindowsVistaStyle::unpolish(), and QStyleSheetStyle::updateStyleSheetFont().
|
private |
geometry of the widget relative to its parent including any window frame
See the Window Geometry documentation for an overview of geometry issues with windows.
By default, this property contains a value that depends on the user's platform and screen geometry.
Definition at line 159 of file qwidget.h.
Referenced by QAccessibleApplication::childAt(), QDesktopWidgetPrivate::cleanup(), PvrEglScreenSurfaceFunctions::createNativeWindow(), QMultiScreen::createSurface(), QRasterWindowSurface::flush(), QDesktopWidgetPrivate::init(), QCustomRasterPaintDevice::metric(), QSizeGrip::mousePressEvent(), QWindowSurface::offset(), QWSWindowSurface::painterOffset(), QWSMemorySurface::painterOffset(), parseGeometry(), QDesktopWidget::screenNumber(), QApplication::topLevelAt(), QWidgetBackingStore::topLevelRect(), QGLContext::updatePaintDevice(), and QDesktopWidgetPrivate::updateScreenList().
|
private |
|
private |
whether the widget is shown in full screen mode
A widget in full screen mode occupies the whole screen area and does not display window decorations, such as a title bar.
By default, this property is false.
Definition at line 194 of file qwidget.h.
Referenced by restoreGeometry().
|
inlineprivate |
the geometry of the widget relative to its parent and excluding the window frame
When changing the geometry, the widget, if visible, receives a move event (moveEvent()) and/or a resize event (resizeEvent()) immediately. If the widget is not currently visible, it is guaranteed to receive appropriate events before it is shown.
The size component is adjusted if it lies outside the range defined by minimumSize() and maximumSize().
See the Window Geometry documentation for an overview of geometry issues with windows.
By default, this property contains a value that depends on the user's platform and screen geometry.
Definition at line 158 of file qwidget.h.
Referenced by QDialog::adjustPosition(), QWidgetAnimator::animate(), QDockAreaLayoutInfo::apply(), QApplicationPrivate::applyX11SpecificCommandLineArguments(), QAccessibleWidget::childAt(), QAccessibleMainWindow::childAt(), do_size_hints(), dockedGeometry(), QBoxLayoutPrivate::effectiveMargins(), QGridLayoutPrivate::effectiveMargins(), QAlphaWidget::eventFilter(), find_child(), QGLWindowSurface::flush(), QWidgetPrivate::getOpaqueChildren(), QVNCIntegration::grabWindow(), QWorkspacePrivate::insertIcon(), isServerProcess(), QCoreGraphicsPaintEngine::macDisplayColorSpace(), make_win_eventUPP(), QWidgetResizeHandler::mouseMoveEvent(), QSizeGrip::mousePressEvent(), QVNCIntegration::moveToScreen(), QWindowSurface::offset(), QWSWindowSurface::painterOffset(), QWSMemorySurface::painterOffset(), QStatusBar::paintEvent(), parseGeometry(), QWorkspacePrivate::place(), QBBWindow::QBBWindow(), QCocoaWindow::QCocoaWindow(), QCocoaWindowSurface::QCocoaWindowSurface(), QPlaceHolderItem::QPlaceHolderItem(), qt_cleanup(), qt_mac_unregister_widget(), qt_show_system_menu(), qt_try_modal(), QAccessibleTabBar::rect(), QAccessibleDockWidget::rect(), QAccessibleTitleBar::rect(), QDecoration::regionAt(), QAlphaWidget::run(), QRollEffect::run(), QToolBarAreaLayout::saveState(), QRollEffect::scroll(), QWSWindowSurface::setClipRegion(), PvrEglWindowSurface::setDirectRegion(), setDisabled(), QWSWindowSurface::setGeometry(), QWSLocalMemSurface::setGeometry(), QStackedLayout::setStackingMode(), QBoxLayoutPrivate::setupGeom(), QGridLayoutPrivate::setupSpacings(), spacingHelper(), QMainWindowLayout::toggleToolBarsVisible(), QPlatformScreen::topLevelAt(), QETWidget::translateMouseEvent(), QGraphicsProxyWidgetPrivate::updateProxyGeometryFromWidget(), and QVGEGLWindowSurfacePrivate::windowSurfaceSize().
|
inlineprivate |
the height of the widget excluding any window frame
See the Window Geometry documentation for an overview of geometry issues with windows.
By default, this property contains a value that depends on the user's platform and screen geometry.
Definition at line 167 of file qwidget.h.
Referenced by QPlainTextEditPrivate::_q_adjustScrollbars(), QPrintDialogPrivate::_q_collapseOrExpandDialog(), QTextEditPrivate::_q_ensureVisible(), QTextEditPrivate::_q_repaintContents(), QPlainTextEditPrivate::_q_repaintContents(), QAxServerBase::ActiveXProc(), QDialog::adjustPosition(), QWorkspaceChild::adjustToFullscreen(), QWidgetAnimator::animate(), QApplicationPrivate::applyX11SpecificCommandLineArguments(), QMacStylePrivate::aquaSizeConstrain(), QWorkspace::arrangeIcons(), QPainterPrivate::attachPainterPrivate(), QPlainTextEditControl::blockBoundingRect(), QGraphicsView::centerOn(), QAccessibleWidget::childAt(), QAccessibleComboBox::childAt(), QAccessibleMainWindow::childAt(), QWidgetPrivate::clipRect(), QLayout::closestAcceptableSize(), QSizeGripPrivate::corner(), QColumnViewPrivate::createColumn(), QXIMInputContext::createICData(), QEgl::createSurface(), distance(), QColumnViewPrivate::doLayout(), QWidgetResizeHandler::doResize(), drawTabBase(), dumpRecursive(), QGraphicsView::ensureVisible(), QMacWindowSurface::flush(), QGLWindowSurface::flush(), QRasterWindowSurface::flush(), QPixmap::grabWidget(), QPixmap::grabWindow(), QWorkspacePrivate::insertIcon(), make_widget_eventUPP(), QListModeViewBase::mapToViewport(), QWidgetResizeHandler::mouseMoveEvent(), QWorkspaceTitleBar::mouseMoveEvent(), QSizeGrip::mousePressEvent(), QColumnViewGrip::moveGrip(), QTreeViewPrivate::pageDown(), QTreeViewPrivate::pageUp(), QTableView::paintEvent(), parseGeometry(), QWorkspacePrivate::place(), QRasterWindowSurface::prepareBuffer(), QDirectFbWindow::QDirectFbWindow(), QOpenKODEWindow::QOpenKODEWindow(), QRollEffect::QRollEffect(), qt_aqua_guess_size(), QXcbWindow::QXcbWindow(), QXlibWindow::QXlibWindow(), QMdi::IconTiler::rearrange(), QAccessibleWidget::rect(), QAccessibleToolButton::rect(), QTextEditPrivate::relayoutDocument(), QColumnViewPreviewColumn::resizeEvent(), QHeaderViewPrivate::resizeSections(), QHeaderView::setOffsetToLastSection(), QTextBrowserPrivate::setSource(), QHeaderViewPrivate::setupSectionIndicator(), QMdiSubWindowPrivate::showButtonsInMenuBar(), QCompleterPrivate::showPopup(), QMacStyle::subElementRect(), QGLContext::updatePaintDevice(), QGraphicsViewPrivate::updateRect(), QGraphicsViewPrivate::updateRegion(), QFocusFramePrivate::updateSize(), QCommonListViewBase::updateVerticalScrollBar(), QScrollAreaPrivate::updateWidgetPosition(), and QWorkspacePrivate::updateWorkspace().
|
private |
What input method specific hints the widget has.
This is only relevant for input widgets. It is used by the input method to retrieve hints as to how the input method should operate. For example, if the Qt::ImhFormattedNumbersOnly flag is set, the input method may change its visual components to reflect that only numbers can be entered.
The default value is Qt::ImhNone.
Definition at line 224 of file qwidget.h.
Referenced by QMacInputContext::globalEventProcessor(), QBBInputContext::setFocusWidget(), QXIMInputContext::setFocusWidget(), QBBAbstractVirtualKeyboard::setInputHintsFromWidget(), QWinInputContext::updateImeStatus(), and QGraphicsViewPrivate::updateInputMethodSensitivity().
|
private |
whether this widget's window is the active window
The active window is the window that contains the widget that has keyboard focus (The window may still have focus if it has no widgets or none of its widgets accepts keyboard focus).
When popup windows are visible, this property is true for both the active window and for the popup.
By default, this property is false.
Definition at line 186 of file qwidget.h.
Referenced by QApplication::alert(), alert_widget(), QMacStylePrivate::animatable(), QWindowsVistaStyle::drawComplexControl(), QWindowsXPStyle::drawComplexControl(), QApplication::event(), QStyledItemDelegate::eventFilter(), QItemDelegate::eventFilter(), QMacStylePrivate::eventFilter(), QApplicationPrivate::globalEventProcessor(), QStyleOption::init(), make_win_eventUPP(), QWizardAntiFlickerWidget::paintEvent(), previousInFocusChain(), qt_try_modal(), QApplication::setActiveWindow(), setFocus(), QAccessibleTabBar::state(), QApplication::syncX(), QMacStylePrivate::timerEvent(), QETWidget::translateMouseEvent(), QWorkspaceTitleBar::usesActiveColor(), and QApplication::x11ProcessEvent().
|
private |
the layout direction for this widget
By default, this property is set to Qt::LeftToRight.
When the layout direction is set on a widget, it will propagate to the widget's children, but not to a child that is a window and not to a child for which setLayoutDirection() has been explicitly called. Also, child widgets added after setLayoutDirection() has been called for the parent do not inherit the parent's layout direction.
This method no longer affects text layout direction since Qt 4.7.
Definition at line 216 of file qwidget.h.
Referenced by QLayout::alignmentRect(), QFormLayoutPrivate::arrangeWidgets(), QMacStyle::drawControl(), QBoxLayoutPrivate::effectiveMargins(), QGridLayoutPrivate::effectiveMargins(), QStyleOption::init(), QMdi::RegularTiler::rearrange(), QMdi::SimpleCascader::rearrange(), QMdi::IconTiler::rearrange(), QGraphicsWidgetPrivate::resolveLayoutDirection(), QGraphicsProxyWidgetPrivate::setWidget_helper(), QCompleterPrivate::showPopup(), and QStyledItemDelegate::updateEditorGeometry().
|
private |
the widget's locale
As long as no special locale has been set, this is either the parent's locale or (if this widget is a top level widget), the default locale.
If the widget displays dates or numbers, these should be formatted using the widget's locale.
|
private |
whether this widget is maximized
This property is only relevant for windows.
By default, this property is false.
Definition at line 193 of file qwidget.h.
Referenced by restoreGeometry(), and setMinimumSize().
|
inlineprivate |
the widget's maximum height in pixels
This property corresponds to the height held by the maximumSize property.
By default, this property contains a value of 16777215.
QWIDGETSIZE_MAX
macro limits the maximum size of widgets.Definition at line 177 of file qwidget.h.
Referenced by QStatusBar::event(), and QStatusBar::reformat().
|
private |
the widget's maximum size in pixels
The widget cannot be resized to a larger size than the maximum widget size.
By default, this property contains a size in which both width and height have values of 16777215.
QWIDGETSIZE_MAX
macro limits the maximum size of widgets.Definition at line 173 of file qwidget.h.
Referenced by QWorkspacePrivate::_q_updateActions(), QSplitterPrivate::addContribution(), QApplicationPrivate::applyX11SpecificCommandLineArguments(), QSplitterPrivate::doMove(), QSplitterPrivate::doResize(), QTreeView::indexRowSizeHint(), QDockWidgetLayout::maximumSize(), menuBarHeightForWidth(), QWidgetResizeHandler::mouseMoveEvent(), QWorkspacePrivate::normalizeWindow(), parseGeometry(), qSmartMaxSize(), qSmartMinSize(), QWorkspaceChild::QWorkspaceChild(), QWorkspaceTitleBar::QWorkspaceTitleBar(), QToolBarAreaLayoutItem::realSizeHint(), QSplitterPrivate::recalc(), QGraphicsProxyWidgetPrivate::setWidget_helper(), QTableView::sizeHintForColumn(), QTreeView::sizeHintForColumn(), QTableView::sizeHintForRow(), QAccessibleWidget::state(), and QWorkspace::tile().
|
inlineprivate |
the widget's maximum width in pixels
This property corresponds to the width held by the maximumSize property.
By default, this property contains a value of 16777215.
QWIDGETSIZE_MAX
macro limits the maximum size of widgets.
|
private |
whether this widget is minimized (iconified)
This property is only relevant for windows.
By default, this property is false.
|
inlineprivate |
the widget's minimum height in pixels
This property corresponds to the height held by the minimumSize property.
By default, this property has a value of 0.
Definition at line 175 of file qwidget.h.
Referenced by QWorkspaceChild::adjustToFullscreen().
|
private |
the widget's minimum size
The widget cannot be resized to a smaller size than the minimum widget size. The widget's size is forced to the minimum size if the current size is smaller.
The minimum size set by this function will override the minimum size defined by QLayout. In order to unset the minimum size, use a value of QSize(0, 0)
.
By default, this property contains a size with zero width and height.
Definition at line 172 of file qwidget.h.
Referenced by QWorkspacePrivate::_q_updateActions(), QLayout::activate(), QApplicationPrivate::applyX11SpecificCommandLineArguments(), QTreeView::indexRowSizeHint(), QWorkspaceChild::minimumSizeHint(), QWidgetResizeHandler::mouseMoveEvent(), QWorkspacePrivate::normalizeWindow(), parseGeometry(), qSmartMaxSize(), qSmartMinSize(), QWorkspaceChild::QWorkspaceChild(), QToolBarAreaLayoutItem::realSizeHint(), QGraphicsProxyWidgetPrivate::setWidget_helper(), QTableView::sizeHintForColumn(), QTreeView::sizeHintForColumn(), QTableView::sizeHintForRow(), QAccessibleWidget::state(), and QWorkspace::tile().
|
private |
the recommended minimum size for the widget
If the value of this property is an invalid size, no minimum size is recommended.
The default implementation of minimumSizeHint() returns an invalid size if there is no layout for this widget, and returns the layout's minimum size otherwise. Most built-in widgets reimplement minimumSizeHint().
QLayout will never resize a widget to a size smaller than the minimum size hint unless minimumSize() is set or the size policy is set to QSizePolicy::Ignore. If minimumSize() is set, the minimum size hint will be ignored.
Definition at line 196 of file qwidget.h.
Referenced by QWorkspaceChild::minimumSizeHint(), qSmartMaxSize(), qSmartMinSize(), QWorkspaceChild::QWorkspaceChild(), and QToolBarAreaLayoutItem::realSizeHint().
|
inlineprivate |
the widget's minimum width in pixels
This property corresponds to the width held by the minimumSize property.
By default, this property has a value of 0.
Definition at line 174 of file qwidget.h.
Referenced by QWorkspaceChild::adjustToFullscreen(), QColumnViewPrivate::createColumn(), menuBarHeightForWidth(), QColumnViewGrip::moveGrip(), QColumnViewPreviewColumn::resizeEvent(), and QColumnViewPreviewColumn::setPreviewWidget().
|
private |
whether the widget is a modal widget
This property only makes sense for windows. A modal widget prevents widgets in all other windows from getting any input.
By default, this property is false.
|
private |
whether mouse tracking is enabled for the widget
If mouse tracking is disabled (the default), the widget only receives mouse move events when at least one mouse button is pressed while the mouse is being moved.
If mouse tracking is enabled, the widget receives mouse move events even if no buttons are pressed.
|
private |
the geometry of the widget as it will appear when shown as a normal (not maximized or full screen) top-level widget
For child widgets this property always holds an empty rectangle.
By default, this property contains an empty rectangle.
Definition at line 160 of file qwidget.h.
Referenced by make_win_eventUPP().
|
private |
the widget's palette
This property describes the widget's palette. The palette is used by the widget's style when rendering standard components, and is available as a means to ensure that custom widgets can maintain consistency with the native platform's look and feel. It's common that different platforms, or different styles, have different palettes.
When you assign a new palette to a widget, the color roles from this palette are combined with the widget's default palette to form the widget's final palette. The palette entry for the widget's background role is used to fill the widget's background (see QWidget::autoFillBackground), and the foreground role initializes QPainter's pen.
The default depends on the system environment. QApplication maintains a system/theme palette which serves as a default for all widgets. There may also be special palette defaults for certain types of widgets (e.g., on Windows XP and Vista, all classes that derive from QMenuBar have a special default palette). You can also define default palettes for widgets yourself by passing a custom palette and the name of a widget to QApplication::setPalette(). Finally, the style always has the option of polishing the palette as it's assigned (see QStyle::polish()).
QWidget propagates explicit palette roles from parent to child. If you assign a brush or color to a specific role on a palette and assign that palette to a widget, that role will propagate to all the widget's children, overriding any system defaults for that role. Note that palettes by default don't propagate to windows (see isWindow()) unless the Qt::WA_WindowPropagation attribute is enabled.
QWidget's palette propagation is similar to its font propagation.
The current style, which is used to render the content of all standard Qt widgets, is free to choose colors and brushes from the widget palette, or in some cases, to ignore the palette (partially, or completely). In particular, certain styles like GTK style, Mac style, Windows XP, and Vista style, depend on third party APIs to render the content of widgets, and these styles typically do not follow the palette. Because of this, assigning roles to a widget's palette is not guaranteed to change the appearance of the widget. Instead, you may choose to apply a styleSheet . You can refer to our Knowledge Base article here for more information.
Definition at line 180 of file qwidget.h.
Referenced by QEgl::createSurface(), QCommonStyle::drawControl(), QStyleOption::init(), QPainter::initFrom(), QAccessibleWidgetEx::invokeMethodEx(), make_widget_eventUPP(), QGraphicsView::paintEvent(), paintSep(), QMacStyle::polish(), QWhatsThat::QWhatsThat(), QStyleSheetStyle::setPalette(), QInputContext::standardFormat(), QDirectFBWindowSurface::updateIsOpaque(), QToolBoxPrivate::updateTabs(), QScriptDebuggerLocalsItemDelegate::validateInput(), and QScriptBreakpointsItemDelegate::validateInput().
|
private |
the position of the widget within its parent widget
If the widget is a window, the position is that of the widget on the desktop, including its frame.
When changing the position, the widget, if visible, receives a move event (moveEvent()) immediately. If the widget is not currently visible, it is guaranteed to receive an event before it is shown.
By default, this property contains a position that refers to the origin.
See the Window Geometry documentation for an overview of geometry issues with windows.
Definition at line 163 of file qwidget.h.
Referenced by do_size_hints(), QGraphicsProxyWidgetPrivate::mapToReceiver(), QToolBarPrivate::mouseMoveEvent(), QApplication::notify(), qt_mac_posInWindow(), qt_x11_recreateWidget(), QTreeViewPrivate::renderTreeToPixmapForAnimation(), QWidgetPrivate::scroll_sys(), QWidgetPrivate::scrollChildren(), QApplicationPrivate::sendMouseEvent(), setDisabled(), and QGraphicsProxyWidgetPrivate::updateProxyGeometryFromWidget().
|
inlineprivate |
the internal geometry of the widget excluding any window frame
The rect property equals QRect(0, 0, width(), height()).
See the Window Geometry documentation for an overview of geometry issues with windows.
By default, this property contains a value that depends on the user's platform and screen geometry.
Definition at line 168 of file qwidget.h.
Referenced by QPlainTextEditPrivate::_q_adjustScrollbars(), QPlainTextEditPrivate::append(), QTreeViewPrivate::beginAnimatedOperation(), QGLWindowSurface::buffer(), QGraphicsViewPrivate::centerView(), QAccessibleStackedWidget::childAt(), QDialog::contextMenuEvent(), QWidgetBackingStore::dirtyRegion(), do_size_hints(), QWidgetResizeHandler::doMove(), QWidgetResizeHandler::doResize(), QAbstractItemViewPrivate::draggablePaintPairs(), QListViewPrivate::draggablePaintPairs(), QWindowsVistaStyle::drawComplexControl(), QWindowsVistaStyle::drawControl(), QGtkStyle::drawControl(), QGraphicsScenePrivate::drawItemHelper(), QWindowsVistaStyle::drawPrimitive(), QWindowsXPStyle::drawPrimitive(), QAbstractItemViewPrivate::dropOn(), QPlainTextEditPrivate::ensureCursorVisible(), QWidgetResizeHandler::eventFilter(), QPlastiqueStyle::eventFilter(), QTreeViewPrivate::expandOrCollapseItemAtPos(), QAbstractItemViewPrivate::fetchMore(), QGraphicsView::fitInView(), flipPoint(), QGLWindowSurface::flush(), QRasterWindowSurface::flush(), QWidgetPrivate::frameStrut(), QWidgetPrivate::getOpaqueChildren(), QX11GLWindowSurface::grabWidget(), QX11WindowSurface::grabWidget(), QWindowSurface::grabWidget(), QPixmap::grabWidget(), handle_xdnd_position(), QListViewPrivate::horizontalScrollToValue(), QStyleOption::init(), QWSWindowSurface::invalidateBuffer(), QWidgetPrivate::isBackgroundInherited(), QAbstractScrollAreaPrivate::layoutChildren(), QWidgetBackingStore::markDirty(), QTest::mouseEvent(), QWidgetResizeHandler::mouseMoveEvent(), QWorkspaceTitleBar::mouseMoveEvent(), QAbstractButtonPrivate::moveFocus(), QPlainTextEditPrivate::pageUpDown(), QDecorationStyled::paint(), QDecorationDefault::paint(), QTextEditPrivate::paint(), QPlainTextEdit::paintEvent(), QTreeViewPrivate::prepareAnimatedOperation(), qt_grab_cursor(), qt_mac_update_widget_position(), QMdiAreaPrivate::rearrange(), QAccessibleAbstractSpinBox::rect(), QTreeViewPrivate::AnimatedOperation::rect(), QAccessibleTextEdit::rect(), QDecoration::region(), QWidgetBackingStore::removeDirtyWidget(), QGraphicsView::render(), QMdiAreaPrivate::resizeToMinimumTileSize(), QWidgetPrivate::screenGeometry(), QRuntimeGraphicsSystem::setGraphicsSystem(), QWidgetBackingStore::showYellowThing(), QCommonStyle::styleHint(), QDirectFBWindowSurface::surfaceForWidget(), QWidgetBackingStore::sync(), QDecorationStyled::titleBarHeight(), QXIMInputContext::update(), QGraphicsViewPrivate::updateLastCenterPoint(), QGraphicsView::updateScene(), QScrollAreaPrivate::updateWidgetPosition(), QListViewPrivate::verticalScrollToValue(), and QApplication::widgetAt().
|
inlineprivate |
the size of the widget excluding any window frame
If the widget is visible when it is being resized, it receives a resize event (resizeEvent()) immediately. If the widget is not currently visible, it is guaranteed to receive an event before it is shown.
The size is adjusted if it lies outside the range defined by minimumSize() and maximumSize().
By default, this property contains a value that depends on the user's platform and screen geometry.
QSize(0, 0)
will cause the widget to not appear on screen. This also applies to windows.Definition at line 165 of file qwidget.h.
Referenced by QTextEditPrivate::_q_adjustScrollbars(), QLayout::activate(), QWidgetAnimator::animate(), QMdiAreaPrivate::appendChild(), QWindowSurface::buffer(), QWorkspace::cascade(), QAccessibleAbstractScrollArea::childAt(), QLayout::closestAcceptableSize(), QScrollArea::ensureWidgetVisible(), QGLWindowSurface::flush(), QSplitterLayoutStruct::getWidgetSize(), QTabBar::initStyleOption(), QDockAreaLayoutInfo::insertGap(), QListView::paintEvent(), PvrEglWindowSurface::PvrEglWindowSurface(), QBBWindow::QBBWindow(), QCocoaWindowSurface::QCocoaWindowSurface(), QDirectFbWindowSurface::QDirectFbWindowSurface(), QFbWindowSurface::QFbWindowSurface(), qt_mac_get_widget_rgn(), qt_mac_update_intersected_gl_widgets(), qt_mac_updateParentUnderAlienWidget(), QWorkspaceChild::QWorkspaceChild(), QAccessibleAbstractScrollArea::rect(), QAccessibleCalendarWidget::rect(), QColumnViewPreviewColumn::resizeEvent(), QWorkspaceChild::resizeEvent(), QMdiAreaPrivate::resizeToMinimumTileSize(), QAlphaWidget::run(), QGLWindowSurface::scroll(), QWidgetPrivate::scroll_sys(), QWidgetPrivate::scrollChildren(), QColumnView::scrollTo(), sendResizeEvents(), QLayout::setMenuBar(), QDeclarativeView::setRootObject(), QGraphicsProxyWidget::subWidgetRect(), QDirectFBWindowSurface::surfaceForWidget(), QDirectFBScreen::surfaceForWidget(), QGraphicsProxyWidgetPrivate::updateProxyGeometryFromWidget(), QScrollAreaPrivate::updateScrollBars(), QColumnViewPrivate::updateScrollbars(), QTreeViewPrivate::updateScrollBars(), QScrollAreaPrivate::updateWidgetPosition(), and QApplication::x11ProcessEvent().
|
private |
the recommended size for the widget
If the value of this property is an invalid size, no size is recommended.
The default implementation of sizeHint() returns an invalid size if there is no layout for this widget, and returns the layout's preferred size otherwise.
Definition at line 195 of file qwidget.h.
Referenced by QMenuPrivate::QMacMenuPrivate::addAction(), QWorkspace::addWindow(), QWorkspace::cascade(), QSplitterLayoutStruct::getWidgetSize(), QTreeView::indexRowSizeHint(), menuBarHeightForWidth(), QColumnViewGrip::mouseDoubleClickEvent(), QRollEffect::QRollEffect(), qSmartMaxSize(), qSmartMinSize(), qt_mac_widget_in_menu_eventHandler(), QWorkspaceChild::QWorkspaceChild(), QToolBarAreaLayoutItem::realSizeHint(), QMdi::SimpleCascader::rearrange(), QScrollArea::setWidget(), QSplitter::sizeHint(), QStackedLayout::sizeHint(), QWorkspaceChild::sizeHint(), QTableView::sizeHintForColumn(), QTreeView::sizeHintForColumn(), QTableView::sizeHintForRow(), and QGraphicsProxyWidgetPrivate::updateProxyGeometryFromWidget().
|
private |
the size increment of the widget
When the user resizes the window, the size will move in steps of sizeIncrement().width() pixels horizontally and sizeIncrement.height() pixels vertically, with baseSize() as the basis. Preferred widget sizes are for non-negative integers i and j:
Note that while you can set the size increment for all widgets, it only affects windows.
By default, this property contains a size with zero width and height.
|
private |
the default layout behavior of the widget
If there is a QLayout that manages this widget's children, the size policy specified by that layout is used. If there is no such QLayout, the result of this function is used.
The default policy is Preferred/Preferred, which means that the widget can be freely resized, but prefers to be the size sizeHint() returns. Button-like widgets set the size policy to specify that they may stretch horizontally, but are fixed vertically. The same applies to lineedit controls (such as QLineEdit, QSpinBox or an editable QComboBox) and other horizontally orientated widgets (such as QProgressBar). QToolButton's are normally square, so they allow growth in both directions. Widgets that support different directions (such as QSlider, QScrollBar or QHeader) specify stretching in the respective direction only. Widgets that can provide scroll bars (usually subclasses of QScrollArea) tend to specify that they can use additional space, and that they can make do with less than sizeHint().
Definition at line 171 of file qwidget.h.
Referenced by QAbstractScrollAreaScrollBarContainer::addWidget(), QLayoutItem::controlTypes(), QSplitterPrivate::doResize(), QSplitterPrivate::findWidget(), QSplitterLayoutStruct::getWidgetSize(), QBoxLayoutItem::hStretch(), QMacStyle::pixelMetric(), qSmartMaxSize(), qSmartMinSize(), QToolBarAreaLayoutItem::realSizeHint(), QSplitter::setStretchFactor(), QGraphicsProxyWidgetPrivate::setWidget_helper(), show(), QStackedLayout::sizeHint(), QToolBarLayout::updateGeomArray(), QScrollAreaPrivate::updateScrollBars(), QBoxLayoutItem::vStretch(), and QFormLayoutItem::vStretch().
|
private |
|
private |
the widget's style sheet
The style sheet contains a textual description of customizations to the widget's style, as described in the Qt Style Sheets document.
Since Qt 4.5, Qt style sheets fully supports Mac OS X.
Definition at line 220 of file qwidget.h.
Referenced by QApplication::setStyle(), and unstylable().
|
private |
the widget's tooltip
Note that by default tooltips are only shown for widgets that are children of the active window. You can change this behavior by setting the attribute Qt::WA_AlwaysShowToolTips on the window, not on the widget with the tooltip.
If you want to control a tooltip's behavior, you can intercept the event() function and catch the QEvent::ToolTip event (e.g., if you want to customize the area for which the tooltip should be shown).
By default, this property contains an empty string.
Definition at line 204 of file qwidget.h.
Referenced by QAccessibleDisplay::imageDescription(), and QAccessibleWidget::text().
|
inlineprivate |
whether updates are enabled
An updates enabled widget receives paint events and has a system background; a disabled widget does not. This also implies that calling update() and repaint() has no effect if updates are disabled.
By default, this property is true.
setUpdatesEnabled() is normally used to disable updates for a short period of time, for instance to avoid screen flicker during large changes. In Qt, widgets normally do not generate screen flicker, but on X11 the server might erase regions on the screen when widgets get hidden before they can be replaced by other widgets. Disabling updates solves this.
Example:
Disabling a widget implicitly disables all its children. Enabling a widget enables all child widgets except top-level widgets or those that have been explicitly disabled. Re-enabling updates implicitly calls update() on the widget.
Definition at line 190 of file qwidget.h.
Referenced by discardInvalidateBufferRequest(), make_widget_eventUPP(), QWidgetBackingStore::markDirty(), QWidgetPrivate::moveRect(), QWidgetPrivate::paintSiblingsRecursive(), QStackedLayout::setCurrentIndex(), setParent(), and QWidgetBackingStore::sync().
|
private |
whether the widget is visible
Calling setVisible(true) or show() sets the widget to visible status if all its parent widgets up to the window are visible. If an ancestor is not visible, the widget won't become visible until all its ancestors are shown. If its size or position has changed, Qt guarantees that a widget gets move and resize events just before it is shown. If the widget has not been resized yet, Qt will adjust the widget's size to a useful default using adjustSize().
Calling setVisible(false) or hide() hides a widget explicitly. An explicitly hidden widget will never become visible, even if all its ancestors become visible, unless you show it.
A widget receives show and hide events when its visibility status changes. Between a hide and a show event, there is no need to waste CPU cycles preparing or displaying information to the user. A video application, for example, might simply stop generating new frames.
A widget that happens to be obscured by other windows on the screen is considered to be visible. The same applies to iconified windows and windows that exist on another virtual desktop (on platforms that support this concept). A widget receives spontaneous show and hide events when its mapping status is changed by the window system, e.g. a spontaneous hide event when the user minimizes the window, and a spontaneous show event when the window is restored again.
You almost never have to reimplement the setVisible() function. If you need to change some settings before a widget is shown, use showEvent() instead. If you need to do some delayed initialization use the Polish event delivered to the event() function.
Definition at line 191 of file qwidget.h.
Referenced by QPlainTextEditPrivate::ensureCursorVisible(), QPlainTextEdit::mouseMoveEvent(), QTextEdit::mouseMoveEvent(), QGLOverlayWidget::paintGL(), QMenuPrivate::scrollMenu(), QPrintDialogPrivate::selectPrinter(), QPlainTextEdit::setBackgroundVisible(), QLineEditPrivate::setCursorVisible(), QCalendarWidget::setNavigationBarVisible(), QDial::setNotchesVisible(), QColumnView::setResizeGripsVisible(), QProgressBar::setTextVisible(), setWindowFlags(), QPlainTextEdit::timerEvent(), QTextEdit::timerEvent(), and QColumnViewPrivate::updateScrollbars().
|
private |
the widget's What's This help text.
By default, this property contains an empty string.
Definition at line 210 of file qwidget.h.
Referenced by QDialog::contextMenuEvent(), and QAccessibleWidget::text().
|
inlineprivate |
the width of the widget excluding any window frame
See the Window Geometry documentation for an overview of geometry issues with windows.
By default, this property contains a value that depends on the user's platform and screen geometry.
Definition at line 166 of file qwidget.h.
Referenced by QPlainTextEditPrivate::_q_adjustScrollbars(), QTextEditPrivate::_q_ensureVisible(), QTextEditPrivate::_q_repaintContents(), QPlainTextEditPrivate::_q_repaintContents(), QAxServerBase::ActiveXProc(), QDialog::adjustPosition(), QWorkspaceChild::adjustToFullscreen(), QWidgetAnimator::animate(), QApplicationPrivate::applyX11SpecificCommandLineArguments(), QMacStylePrivate::aquaSizeConstrain(), QWorkspace::arrangeIcons(), QPainterPrivate::attachPainterPrivate(), QGraphicsView::centerOn(), QAccessibleWidget::childAt(), QAccessibleComboBox::childAt(), QAccessibleMainWindow::childAt(), QWidgetPrivate::clipRect(), QLayout::closestAcceptableSize(), QSizeGripPrivate::corner(), QColumnViewPrivate::createColumn(), QXIMInputContext::createICData(), QEgl::createSurface(), distance(), QColumnViewPrivate::doLayout(), QWidgetResizeHandler::doResize(), drawTabBase(), dumpRecursive(), QGraphicsView::ensureVisible(), QMacWindowSurface::flush(), QPixmap::grabWidget(), QPixmap::grabWindow(), QListModeViewBase::indexToListViewItem(), QWorkspacePrivate::insertIcon(), make_widget_eventUPP(), QListModeViewBase::mapToViewport(), QStatusBarPrivate::messageRect(), QMenuBar::minimumSizeHint(), QColumnViewGrip::mouseDoubleClickEvent(), QWidgetResizeHandler::mouseMoveEvent(), QWorkspaceTitleBar::mouseMoveEvent(), QSizeGrip::mousePressEvent(), QColumnViewGrip::moveGrip(), QTreeViewPrivate::paintAlternatingRowColors(), QTableView::paintEvent(), parseGeometry(), QWorkspacePrivate::place(), QRasterWindowSurface::prepareBuffer(), QDirectFbWindow::QDirectFbWindow(), QOpenKODEWindow::QOpenKODEWindow(), QRollEffect::QRollEffect(), qt_aqua_guess_size(), qt_grab_cursor(), QXcbWindow::QXcbWindow(), QXlibWindow::QXlibWindow(), QMdi::IconTiler::rearrange(), QAccessibleWidget::rect(), QTextEditPrivate::relayoutDocument(), QPlainTextEditPrivate::relayoutDocument(), QHeaderViewPrivate::resizeSections(), QColumnView::scrollTo(), QTableViewPrivate::selectRow(), QAbstractItemViewPrivate::setHoverIndex(), QHeaderView::setOffsetToLastSection(), QHeaderViewPrivate::setupSectionIndicator(), QCompleterPrivate::showPopup(), QMenuBar::sizeHint(), QCommonListViewBase::updateHorizontalScrollBar(), QGLContext::updatePaintDevice(), QGraphicsViewPrivate::updateRect(), QGraphicsViewPrivate::updateRegion(), QFocusFramePrivate::updateSize(), QScrollAreaPrivate::updateWidgetPosition(), and QWorkspacePrivate::updateWorkspace().
|
private |
the file path associated with a widget
This property only makes sense for windows. It associates a file path with a window. If you set the file path, but have not set the window title, Qt sets the window title to contain a string created using the following components.
On Mac OS X:
On Windows and X11:
*
character, if the windowModified property is set. 0x2014
unicode character, padded either side by spaces. If the window title is set at any point, then the window title takes precedence and will be shown instead of the file path string.
Additionally, on Mac OS X, this has an added benefit that it sets the proxy icon for the window, assuming that the file path exists.
If no file path is set, this property contains an empty string.
By default, this property contains an empty string.
|
private |
the widget's icon
This property only makes sense for windows. If no icon has been set, windowIcon() returns the application icon (QApplication::windowIcon()).
Definition at line 199 of file qwidget.h.
Referenced by QWindowsVistaStyle::drawControl(), QWindowsXPStyle::drawControl(), QWorkspaceChild::eventFilter(), QDecorationStyled::paint(), parseGeometry(), QDecorationDefault::pixmapFor(), QWorkspaceChild::QWorkspaceChild(), QDecorationStyled::region(), and QDecorationStyled::titleBarHeight().
|
private |
the widget's icon text
This property only makes sense for windows. If no icon text has been set, this functions returns an empty string.
|
private |
which windows are blocked by the modal widget
This property only makes sense for windows. A modal widget prevents widgets in other windows from getting input. The value of this property controls which windows are blocked when the widget is visible. Changing this property while the window is visible has no effect; you must hide() the widget first, then show() it again.
By default, this property is Qt::NonModal.
Definition at line 156 of file qwidget.h.
Referenced by QApplicationPrivate::isBlockedByModal(), qt_mac_is_macsheet(), qt_mac_should_disable_menu(), and QWidgetPrivate::setModal_sys().
|
private |
whether the document shown in the window has unsaved changes
A modified window is a window whose content has changed but has not been saved to disk. This flag will have different effects varied by the platform. On Mac OS X the close button will have a modified look; on other platforms, the window title will have an '*' (asterisk).
The window title must contain a "[*]" placeholder, which indicates where the '*' should appear. Normally, it should appear right after the file name (e.g., "document1.txt[*] - Text Editor"). If the window isn't modified, the placeholder is simply removed.
Note that if a widget is set as modified, all its ancestors will also be set as modified. However, if you call {setWindowModified(false)}
on a widget, this will not propagate to its parent because other children of the parent might have been modified.
Definition at line 202 of file qwidget.h.
Referenced by QMdiSubWindow::eventFilter().
|
private |
The level of opacity for the window.
The valid range of opacity is from 1.0 (completely opaque) to 0.0 (completely transparent).
By default the value of this property is 1.0.
This feature is available on Embedded Linux, Mac OS X, Windows, and X11 platforms that support the Composite extension.
This feature is not available on Windows CE.
Note that under X11 you need to have a composite manager running, and the X11 specific _NET_WM_WINDOW_OPACITY atom needs to be supported by the window manager you are using.
Definition at line 201 of file qwidget.h.
Referenced by _q_paintItem(), QGraphicsScenePrivate::drawItemHelper(), QDirectFBWindowSurface::flush(), QRasterWindowSurface::flush(), QDirectFBWindowSurface::QDirectFBWindowSurface(), and QDirectFBWindowSurface::updateIsOpaque().
|
private |
the window title (caption)
This property only makes sense for top-level widgets, such as windows and dialogs. If no caption has been set, the title is based of the windowFilePath . If neither of these is set, then the title is an empty string.
If you use the windowModified mechanism, the window title must contain a "[*]" placeholder, which indicates where the '*' should appear. Normally, it should appear right after the file name (e.g., "document1.txt[*] - Text Editor"). If the windowModified property is false (the default), the placeholder is simply removed.
Definition at line 198 of file qwidget.h.
Referenced by AccessibleFactory::create(), QFileDialogPrivate::createNavServicesDialog(), QVistaHelper::drawTitleBar(), QWorkspace::eventFilter(), QWorkspaceChild::QWorkspaceChild(), QWorkspaceTitleBar::QWorkspaceTitleBar(), QMdiSubWindowPrivate::removeBaseWidget(), QToolBarAreaLayout::saveState(), QPrintDialogPrivate::setTabs(), QGraphicsProxyWidgetPrivate::setWidget_helper(), QCoreFuriCuri::timerEvent(), QMdiSubWindowPrivate::updateWindowTitle(), QDecorationDefault::windowTitleFor(), and QWSWindowSurface::winId().
|
private |
the x coordinate of the widget relative to its parent including any window frame
See the Window Geometry documentation for an overview of geometry issues with windows.
By default, this property has a value of 0.
Definition at line 161 of file qwidget.h.
Referenced by QWorkspace::addWindow(), QDialog::adjustPosition(), QWidgetPrivate::clipRect(), QWidgetPrivate::clipRegion(), QEgl::createSurface(), distance(), do_size_hints(), dumpRecursive(), QBBScreenEventHandler::injectPointerMoveEvent(), mdiAreaNavigate(), QStatusBarPrivate::messageRect(), QColumnViewGrip::moveGrip(), parseGeometry(), QWorkspacePrivate::place(), QDirectFbWindow::QDirectFbWindow(), QOpenKODEWindow::QOpenKODEWindow(), qt_win_getKeyboardModifiers(), QXcbWindow::QXcbWindow(), QXlibWindow::QXlibWindow(), QFocusFramePrivate::updateSize(), and QWorkspacePrivate::updateWorkspace().
|
private |
the y coordinate of the widget relative to its parent and including any window frame
See the Window Geometry documentation for an overview of geometry issues with windows.
By default, this property has a value of 0.
Definition at line 162 of file qwidget.h.
Referenced by QPrintDialogPrivate::_q_collapseOrExpandDialog(), QWorkspace::addWindow(), QDialog::adjustPosition(), QWidgetPrivate::clipRect(), QEgl::createSurface(), distance(), do_size_hints(), dumpRecursive(), QBBScreenEventHandler::injectPointerMoveEvent(), mdiAreaNavigate(), parseGeometry(), QWorkspacePrivate::place(), QDirectFbWindow::QDirectFbWindow(), QOpenKODEWindow::QOpenKODEWindow(), QXcbWindow::QXcbWindow(), QXlibWindow::QXlibWindow(), QFocusFramePrivate::updateSize(), and QWorkspacePrivate::updateWorkspace().