Eneboo - Documentación para desarrolladores
|
The QWidget class is the base class of all user interface objects. Más...
#include <qwidget.h>
Tipos públicos | |
enum | FocusPolicy { NoFocus = 0, TabFocus = 0x1, ClickFocus = 0x2, StrongFocus = TabFocus | ClickFocus | 0x8, WheelFocus = StrongFocus | 0x4, NoFocus = 0, TabFocus = 0x1, ClickFocus = 0x2, StrongFocus = TabFocus | ClickFocus | 0x8, WheelFocus = StrongFocus | 0x4 } |
enum | BackgroundOrigin { WidgetOrigin, ParentOrigin, WindowOrigin, AncestorOrigin, WidgetOrigin, ParentOrigin, WindowOrigin, AncestorOrigin } |
enum | FocusPolicy { NoFocus = 0, TabFocus = 0x1, ClickFocus = 0x2, StrongFocus = TabFocus | ClickFocus | 0x8, WheelFocus = StrongFocus | 0x4, NoFocus = 0, TabFocus = 0x1, ClickFocus = 0x2, StrongFocus = TabFocus | ClickFocus | 0x8, WheelFocus = StrongFocus | 0x4 } |
enum | BackgroundOrigin { WidgetOrigin, ParentOrigin, WindowOrigin, AncestorOrigin, WidgetOrigin, ParentOrigin, WindowOrigin, AncestorOrigin } |
Slots públicos | |
virtual void | setEnabled (bool) |
void | setDisabled (bool) |
virtual void | setCaption (const QString &) |
virtual void | setIcon (const QPixmap &) |
virtual void | setIconText (const QString &) |
virtual void | setMouseTracking (bool enable) |
virtual void | setFocus () |
void | clearFocus () |
virtual void | setUpdatesEnabled (bool enable) |
void | update () |
void | update (int x, int y, int w, int h) |
void | update (const QRect &) |
void | repaint () |
void | repaint (bool erase) |
void | repaint (int x, int y, int w, int h, bool erase=TRUE) |
void | repaint (const QRect &, bool erase=TRUE) |
void | repaint (const QRegion &, bool erase=TRUE) |
virtual void | show () |
virtual void | hide () |
void | setShown (bool show) |
void | setHidden (bool hide) |
void | iconify () |
virtual void | showMinimized () |
virtual void | showMaximized () |
void | showFullScreen () |
virtual void | showNormal () |
virtual void | polish () |
void | constPolish () const |
bool | close () |
void | raise () |
void | lower () |
void | stackUnder (QWidget *) |
virtual void | move (int x, int y) |
void | move (const QPoint &) |
virtual void | resize (int w, int h) |
void | resize (const QSize &) |
virtual void | setGeometry (int x, int y, int w, int h) |
virtual void | setGeometry (const QRect &) |
virtual void | adjustSize () |
virtual void | setEnabled (bool) |
void | setDisabled (bool) |
virtual void | setCaption (const QString &) |
virtual void | setIcon (const QPixmap &) |
virtual void | setIconText (const QString &) |
virtual void | setMouseTracking (bool enable) |
virtual void | setFocus () |
void | clearFocus () |
virtual void | setUpdatesEnabled (bool enable) |
void | update () |
void | update (int x, int y, int w, int h) |
void | update (const QRect &) |
void | repaint () |
void | repaint (bool erase) |
void | repaint (int x, int y, int w, int h, bool erase=TRUE) |
void | repaint (const QRect &, bool erase=TRUE) |
void | repaint (const QRegion &, bool erase=TRUE) |
virtual void | show () |
virtual void | hide () |
void | setShown (bool show) |
void | setHidden (bool hide) |
void | iconify () |
virtual void | showMinimized () |
virtual void | showMaximized () |
void | showFullScreen () |
virtual void | showNormal () |
virtual void | polish () |
void | constPolish () const |
bool | close () |
void | raise () |
void | lower () |
void | stackUnder (QWidget *) |
virtual void | move (int x, int y) |
void | move (const QPoint &) |
virtual void | resize (int w, int h) |
void | resize (const QSize &) |
virtual void | setGeometry (int x, int y, int w, int h) |
virtual void | setGeometry (const QRect &) |
virtual void | adjustSize () |
Métodos públicos | |
Q_EXPLICIT | QWidget (QWidget *parent=0, const char *name=0, WFlags f=0) |
~QWidget () | |
WId | winId () const |
void | setName (const char *name) |
QStyle & | style () const |
void | setStyle (QStyle *) |
QStyle * | setStyle (const QString &) |
bool | isTopLevel () const |
bool | isDialog () const |
bool | isPopup () const |
bool | isDesktop () const |
bool | isModal () const |
bool | isEnabled () const |
bool | isEnabledTo (QWidget *) const |
bool | isEnabledToTLW () const |
QRect | frameGeometry () const |
const QRect & | geometry () const |
int | x () const |
int | y () const |
QPoint | pos () const |
QSize | frameSize () const |
QSize | size () const |
int | width () const |
int | height () const |
QRect | rect () const |
QRect | childrenRect () const |
QRegion | childrenRegion () const |
QSize | minimumSize () const |
QSize | maximumSize () const |
int | minimumWidth () const |
int | minimumHeight () const |
int | maximumWidth () const |
int | maximumHeight () const |
void | setMinimumSize (const QSize &) |
virtual void | setMinimumSize (int minw, int minh) |
void | setMaximumSize (const QSize &) |
virtual void | setMaximumSize (int maxw, int maxh) |
void | setMinimumWidth (int minw) |
void | setMinimumHeight (int minh) |
void | setMaximumWidth (int maxw) |
void | setMaximumHeight (int maxh) |
QSize | sizeIncrement () const |
void | setSizeIncrement (const QSize &) |
virtual void | setSizeIncrement (int w, int h) |
QSize | baseSize () const |
void | setBaseSize (const QSize &) |
void | setBaseSize (int basew, int baseh) |
void | setFixedSize (const QSize &) |
void | setFixedSize (int w, int h) |
void | setFixedWidth (int w) |
void | setFixedHeight (int h) |
QPoint | mapToGlobal (const QPoint &) const |
QPoint | mapFromGlobal (const QPoint &) const |
QPoint | mapToParent (const QPoint &) const |
QPoint | mapFromParent (const QPoint &) const |
QPoint | mapTo (QWidget *, const QPoint &) const |
QPoint | mapFrom (QWidget *, const QPoint &) const |
QWidget * | topLevelWidget () const |
BackgroundMode | backgroundMode () const |
virtual void | setBackgroundMode (BackgroundMode) |
void | setBackgroundMode (BackgroundMode, BackgroundMode) |
const QColor & | foregroundColor () const |
const QColor & | eraseColor () const |
virtual void | setEraseColor (const QColor &) |
const QPixmap * | erasePixmap () const |
virtual void | setErasePixmap (const QPixmap &) |
const QColorGroup & | colorGroup () const |
const QPalette & | palette () const |
bool | ownPalette () const |
virtual void | setPalette (const QPalette &) |
void | unsetPalette () |
const QColor & | paletteForegroundColor () const |
void | setPaletteForegroundColor (const QColor &) |
const QColor & | paletteBackgroundColor () const |
virtual void | setPaletteBackgroundColor (const QColor &) |
const QPixmap * | paletteBackgroundPixmap () const |
virtual void | setPaletteBackgroundPixmap (const QPixmap &) |
const QBrush & | backgroundBrush () const |
QFont | font () const |
bool | ownFont () const |
virtual void | setFont (const QFont &) |
void | unsetFont () |
QFontMetrics | fontMetrics () const |
QFontInfo | fontInfo () const |
const QCursor & | cursor () const |
bool | ownCursor () const |
virtual void | setCursor (const QCursor &) |
virtual void | unsetCursor () |
QString | caption () const |
const QPixmap * | icon () const |
QString | iconText () const |
bool | hasMouseTracking () const |
bool | hasMouse () const |
virtual void | setMask (const QBitmap &) |
virtual void | setMask (const QRegion &) |
void | clearMask () |
const QColor & | backgroundColor () const |
virtual void | setBackgroundColor (const QColor &) |
const QPixmap * | backgroundPixmap () const |
virtual void | setBackgroundPixmap (const QPixmap &) |
bool | isActiveWindow () const |
virtual void | setActiveWindow () |
bool | isFocusEnabled () const |
FocusPolicy | focusPolicy () const |
virtual void | setFocusPolicy (FocusPolicy) |
bool | hasFocus () const |
virtual void | setFocusProxy (QWidget *) |
QWidget * | focusProxy () const |
void | setInputMethodEnabled (bool b) |
bool | isInputMethodEnabled () const |
void | grabMouse () |
void | grabMouse (const QCursor &) |
void | releaseMouse () |
void | grabKeyboard () |
void | releaseKeyboard () |
bool | isUpdatesEnabled () const |
virtual bool | close (bool alsoDelete) |
bool | isVisible () const |
bool | isVisibleTo (QWidget *) const |
bool | isVisibleToTLW () const |
QRect | visibleRect () const |
bool | isHidden () const |
bool | isShown () const |
bool | isMinimized () const |
bool | isMaximized () const |
bool | isFullScreen () const |
uint | windowState () const |
void | setWindowState (uint windowState) |
virtual QSize | sizeHint () const |
virtual QSize | minimumSizeHint () const |
virtual QSizePolicy | sizePolicy () const |
virtual void | setSizePolicy (QSizePolicy) |
void | setSizePolicy (QSizePolicy::SizeType hor, QSizePolicy::SizeType ver, bool hfw=FALSE) |
virtual int | heightForWidth (int) const |
QRegion | clipRegion () const |
QLayout * | layout () const |
void | updateGeometry () |
virtual void | reparent (QWidget *parent, WFlags, const QPoint &, bool showIt=FALSE) |
void | reparent (QWidget *parent, const QPoint &, bool showIt=FALSE) |
void | recreate (QWidget *parent, WFlags f, const QPoint &p, bool showIt=FALSE) |
void | erase () |
void | erase (int x, int y, int w, int h) |
void | erase (const QRect &) |
void | erase (const QRegion &) |
void | scroll (int dx, int dy) |
void | scroll (int dx, int dy, const QRect &) |
void | drawText (int x, int y, const QString &) |
void | drawText (const QPoint &, const QString &) |
QWidget * | focusWidget () const |
QRect | microFocusHint () const |
bool | acceptDrops () const |
virtual void | setAcceptDrops (bool on) |
virtual void | setAutoMask (bool) |
bool | autoMask () const |
virtual void | setBackgroundOrigin (BackgroundOrigin) |
BackgroundOrigin | backgroundOrigin () const |
QPoint | backgroundOffset () const |
virtual bool | customWhatsThis () const |
QWidget * | parentWidget (bool sameWindow=FALSE) const |
WState | testWState (WState s) const |
WFlags | testWFlags (WFlags f) const |
QWidget * | childAt (int x, int y, bool includeThis=FALSE) const |
QWidget * | childAt (const QPoint &, bool includeThis=FALSE) const |
void | setWindowOpacity (double level) |
double | windowOpacity () const |
void | setPalette (const QPalette &p, bool) |
void | setFont (const QFont &f, bool) |
Q_EXPLICIT | QWidget (QWidget *parent=0, const char *name=0, WFlags f=0) |
~QWidget () | |
WId | winId () const |
void | setName (const char *name) |
QStyle & | style () const |
void | setStyle (QStyle *) |
QStyle * | setStyle (const QString &) |
bool | isTopLevel () const |
bool | isDialog () const |
bool | isPopup () const |
bool | isDesktop () const |
bool | isModal () const |
bool | isEnabled () const |
bool | isEnabledTo (QWidget *) const |
bool | isEnabledToTLW () const |
QRect | frameGeometry () const |
const QRect & | geometry () const |
int | x () const |
int | y () const |
QPoint | pos () const |
QSize | frameSize () const |
QSize | size () const |
int | width () const |
int | height () const |
QRect | rect () const |
QRect | childrenRect () const |
QRegion | childrenRegion () const |
QSize | minimumSize () const |
QSize | maximumSize () const |
int | minimumWidth () const |
int | minimumHeight () const |
int | maximumWidth () const |
int | maximumHeight () const |
void | setMinimumSize (const QSize &) |
virtual void | setMinimumSize (int minw, int minh) |
void | setMaximumSize (const QSize &) |
virtual void | setMaximumSize (int maxw, int maxh) |
void | setMinimumWidth (int minw) |
void | setMinimumHeight (int minh) |
void | setMaximumWidth (int maxw) |
void | setMaximumHeight (int maxh) |
QSize | sizeIncrement () const |
void | setSizeIncrement (const QSize &) |
virtual void | setSizeIncrement (int w, int h) |
QSize | baseSize () const |
void | setBaseSize (const QSize &) |
void | setBaseSize (int basew, int baseh) |
void | setFixedSize (const QSize &) |
void | setFixedSize (int w, int h) |
void | setFixedWidth (int w) |
void | setFixedHeight (int h) |
QPoint | mapToGlobal (const QPoint &) const |
QPoint | mapFromGlobal (const QPoint &) const |
QPoint | mapToParent (const QPoint &) const |
QPoint | mapFromParent (const QPoint &) const |
QPoint | mapTo (QWidget *, const QPoint &) const |
QPoint | mapFrom (QWidget *, const QPoint &) const |
QWidget * | topLevelWidget () const |
BackgroundMode | backgroundMode () const |
virtual void | setBackgroundMode (BackgroundMode) |
void | setBackgroundMode (BackgroundMode, BackgroundMode) |
const QColor & | foregroundColor () const |
const QColor & | eraseColor () const |
virtual void | setEraseColor (const QColor &) |
const QPixmap * | erasePixmap () const |
virtual void | setErasePixmap (const QPixmap &) |
const QColorGroup & | colorGroup () const |
const QPalette & | palette () const |
bool | ownPalette () const |
virtual void | setPalette (const QPalette &) |
void | unsetPalette () |
const QColor & | paletteForegroundColor () const |
void | setPaletteForegroundColor (const QColor &) |
const QColor & | paletteBackgroundColor () const |
virtual void | setPaletteBackgroundColor (const QColor &) |
const QPixmap * | paletteBackgroundPixmap () const |
virtual void | setPaletteBackgroundPixmap (const QPixmap &) |
const QBrush & | backgroundBrush () const |
QFont | font () const |
bool | ownFont () const |
virtual void | setFont (const QFont &) |
void | unsetFont () |
QFontMetrics | fontMetrics () const |
QFontInfo | fontInfo () const |
const QCursor & | cursor () const |
bool | ownCursor () const |
virtual void | setCursor (const QCursor &) |
virtual void | unsetCursor () |
QString | caption () const |
const QPixmap * | icon () const |
QString | iconText () const |
bool | hasMouseTracking () const |
bool | hasMouse () const |
virtual void | setMask (const QBitmap &) |
virtual void | setMask (const QRegion &) |
void | clearMask () |
const QColor & | backgroundColor () const |
virtual void | setBackgroundColor (const QColor &) |
const QPixmap * | backgroundPixmap () const |
virtual void | setBackgroundPixmap (const QPixmap &) |
bool | isActiveWindow () const |
virtual void | setActiveWindow () |
bool | isFocusEnabled () const |
FocusPolicy | focusPolicy () const |
virtual void | setFocusPolicy (FocusPolicy) |
bool | hasFocus () const |
virtual void | setFocusProxy (QWidget *) |
QWidget * | focusProxy () const |
void | setInputMethodEnabled (bool b) |
bool | isInputMethodEnabled () const |
void | grabMouse () |
void | grabMouse (const QCursor &) |
void | releaseMouse () |
void | grabKeyboard () |
void | releaseKeyboard () |
bool | isUpdatesEnabled () const |
virtual bool | close (bool alsoDelete) |
bool | isVisible () const |
bool | isVisibleTo (QWidget *) const |
bool | isVisibleToTLW () const |
QRect | visibleRect () const |
bool | isHidden () const |
bool | isShown () const |
bool | isMinimized () const |
bool | isMaximized () const |
bool | isFullScreen () const |
uint | windowState () const |
void | setWindowState (uint windowState) |
virtual QSize | sizeHint () const |
virtual QSize | minimumSizeHint () const |
virtual QSizePolicy | sizePolicy () const |
virtual void | setSizePolicy (QSizePolicy) |
void | setSizePolicy (QSizePolicy::SizeType hor, QSizePolicy::SizeType ver, bool hfw=FALSE) |
virtual int | heightForWidth (int) const |
QRegion | clipRegion () const |
QLayout * | layout () const |
void | updateGeometry () |
virtual void | reparent (QWidget *parent, WFlags, const QPoint &, bool showIt=FALSE) |
void | reparent (QWidget *parent, const QPoint &, bool showIt=FALSE) |
void | recreate (QWidget *parent, WFlags f, const QPoint &p, bool showIt=FALSE) |
void | erase () |
void | erase (int x, int y, int w, int h) |
void | erase (const QRect &) |
void | erase (const QRegion &) |
void | scroll (int dx, int dy) |
void | scroll (int dx, int dy, const QRect &) |
void | drawText (int x, int y, const QString &) |
void | drawText (const QPoint &, const QString &) |
QWidget * | focusWidget () const |
QRect | microFocusHint () const |
bool | acceptDrops () const |
virtual void | setAcceptDrops (bool on) |
virtual void | setAutoMask (bool) |
bool | autoMask () const |
virtual void | setBackgroundOrigin (BackgroundOrigin) |
BackgroundOrigin | backgroundOrigin () const |
QPoint | backgroundOffset () const |
virtual bool | customWhatsThis () const |
QWidget * | parentWidget (bool sameWindow=FALSE) const |
WState | testWState (WState s) const |
WFlags | testWFlags (WFlags f) const |
QWidget * | childAt (int x, int y, bool includeThis=FALSE) const |
QWidget * | childAt (const QPoint &, bool includeThis=FALSE) const |
void | setWindowOpacity (double level) |
double | windowOpacity () const |
void | setPalette (const QPalette &p, bool) |
void | setFont (const QFont &f, bool) |
Métodos públicos estáticos | |
static void | setTabOrder (QWidget *, QWidget *) |
static QWidget * | mouseGrabber () |
static QWidget * | keyboardGrabber () |
static QWidget * | find (WId) |
static QWidgetMapper * | wmapper () |
static void | setTabOrder (QWidget *, QWidget *) |
static QWidget * | mouseGrabber () |
static QWidget * | keyboardGrabber () |
static QWidget * | find (WId) |
static QWidgetMapper * | wmapper () |
Métodos protegidos | |
bool | event (QEvent *) |
virtual void | mousePressEvent (QMouseEvent *) |
virtual void | mouseReleaseEvent (QMouseEvent *) |
virtual void | mouseDoubleClickEvent (QMouseEvent *) |
virtual void | mouseMoveEvent (QMouseEvent *) |
virtual void | wheelEvent (QWheelEvent *) |
virtual void | keyPressEvent (QKeyEvent *) |
virtual void | keyReleaseEvent (QKeyEvent *) |
virtual void | focusInEvent (QFocusEvent *) |
virtual void | focusOutEvent (QFocusEvent *) |
virtual void | enterEvent (QEvent *) |
virtual void | leaveEvent (QEvent *) |
virtual void | paintEvent (QPaintEvent *) |
virtual void | moveEvent (QMoveEvent *) |
virtual void | resizeEvent (QResizeEvent *) |
virtual void | closeEvent (QCloseEvent *) |
virtual void | contextMenuEvent (QContextMenuEvent *) |
virtual void | imStartEvent (QIMEvent *) |
virtual void | imComposeEvent (QIMEvent *) |
virtual void | imEndEvent (QIMEvent *) |
virtual void | tabletEvent (QTabletEvent *) |
virtual void | dragEnterEvent (QDragEnterEvent *) |
virtual void | dragMoveEvent (QDragMoveEvent *) |
virtual void | dragLeaveEvent (QDragLeaveEvent *) |
virtual void | dropEvent (QDropEvent *) |
virtual void | showEvent (QShowEvent *) |
virtual void | hideEvent (QHideEvent *) |
virtual void | updateMask () |
virtual void | styleChange (QStyle &) |
virtual void | enabledChange (bool oldEnabled) |
virtual void | paletteChange (const QPalette &) |
virtual void | fontChange (const QFont &) |
virtual void | windowActivationChange (bool oldActive) |
int | metric (int) const |
void | resetInputContext () |
virtual void | create (WId=0, bool initializeWindow=TRUE, bool destroyOldWindow=TRUE) |
virtual void | destroy (bool destroyWindow=TRUE, bool destroySubWindows=TRUE) |
uint | getWState () const |
virtual void | setWState (uint) |
void | clearWState (uint n) |
WFlags | getWFlags () const |
virtual void | setWFlags (WFlags) |
void | clearWFlags (WFlags n) |
virtual bool | focusNextPrevChild (bool next) |
QWExtra * | extraData () |
QTLWExtra * | topData () |
QFocusData * | focusData () |
virtual void | setKeyCompression (bool) |
virtual void | setMicroFocusHint (int x, int y, int w, int h, bool text=TRUE, QFont *f=0) |
bool | event (QEvent *) |
virtual void | mousePressEvent (QMouseEvent *) |
virtual void | mouseReleaseEvent (QMouseEvent *) |
virtual void | mouseDoubleClickEvent (QMouseEvent *) |
virtual void | mouseMoveEvent (QMouseEvent *) |
virtual void | wheelEvent (QWheelEvent *) |
virtual void | keyPressEvent (QKeyEvent *) |
virtual void | keyReleaseEvent (QKeyEvent *) |
virtual void | focusInEvent (QFocusEvent *) |
virtual void | focusOutEvent (QFocusEvent *) |
virtual void | enterEvent (QEvent *) |
virtual void | leaveEvent (QEvent *) |
virtual void | paintEvent (QPaintEvent *) |
virtual void | moveEvent (QMoveEvent *) |
virtual void | resizeEvent (QResizeEvent *) |
virtual void | closeEvent (QCloseEvent *) |
virtual void | contextMenuEvent (QContextMenuEvent *) |
virtual void | imStartEvent (QIMEvent *) |
virtual void | imComposeEvent (QIMEvent *) |
virtual void | imEndEvent (QIMEvent *) |
virtual void | tabletEvent (QTabletEvent *) |
virtual void | dragEnterEvent (QDragEnterEvent *) |
virtual void | dragMoveEvent (QDragMoveEvent *) |
virtual void | dragLeaveEvent (QDragLeaveEvent *) |
virtual void | dropEvent (QDropEvent *) |
virtual void | showEvent (QShowEvent *) |
virtual void | hideEvent (QHideEvent *) |
virtual void | updateMask () |
virtual void | styleChange (QStyle &) |
virtual void | enabledChange (bool oldEnabled) |
virtual void | paletteChange (const QPalette &) |
virtual void | fontChange (const QFont &) |
virtual void | windowActivationChange (bool oldActive) |
int | metric (int) const |
void | resetInputContext () |
virtual void | create (WId=0, bool initializeWindow=TRUE, bool destroyOldWindow=TRUE) |
virtual void | destroy (bool destroyWindow=TRUE, bool destroySubWindows=TRUE) |
uint | getWState () const |
virtual void | setWState (uint) |
void | clearWState (uint n) |
WFlags | getWFlags () const |
virtual void | setWFlags (WFlags) |
void | clearWFlags (WFlags n) |
virtual bool | focusNextPrevChild (bool next) |
QWExtra * | extraData () |
QTLWExtra * | topData () |
QFocusData * | focusData () |
virtual void | setKeyCompression (bool) |
virtual void | setMicroFocusHint (int x, int y, int w, int h, bool text=TRUE, QFont *f=0) |
Propiedades | |
bool | isTopLevel |
whether the widget is a top-level widget | |
bool | isDialog |
whether the widget is a dialog widget | |
bool | isModal |
whether the widget is a modal widget | |
bool | isPopup |
whether the widget is a popup widget | |
bool | isDesktop |
whether the widget is a desktop widget, i.e. represents the desktop | |
bool | enabled |
whether the widget is enabled | |
QRect | geometry |
the geometry of the widget relative to its parent and excluding the window frame | |
QRect | frameGeometry |
geometry of the widget relative to its parent including any window frame | |
int | x |
the x coordinate of the widget relative to its parent including any window frame | |
int | y |
the y coordinate of the widget relative to its parent and including any window frame | |
QPoint | pos |
the position of the widget within its parent widget | |
QSize | frameSize |
the size of the widget including any window frame | |
QSize | size |
the size of the widget excluding any window frame | |
int | width |
the width of the widget excluding any window frame | |
int | height |
the height of the widget excluding any window frame | |
QRect | rect |
the internal geometry of the widget excluding any window frame | |
QRect | childrenRect |
the bounding rectangle of the widget's children | |
QRegion | childrenRegion |
the combined region occupied by the widget's children | |
QSizePolicy | sizePolicy |
the default layout behavior of the widget | |
QSize | minimumSize |
the widget's minimum size | |
QSize | maximumSize |
the widget's maximum size | |
int | minimumWidth |
the widget's minimum width | |
int | minimumHeight |
the widget's minimum height | |
int | maximumWidth |
the widget's maximum width | |
int | maximumHeight |
the widget's maximum height | |
QSize | sizeIncrement |
the size increment of the widget | |
QSize | baseSize |
the base size of the widget | |
BackgroundMode | backgroundMode |
the color role used for painting the background of the widget | |
QColor | paletteForegroundColor |
the foreground color of the widget | |
QColor | paletteBackgroundColor |
the background color of the widget | |
QPixmap | paletteBackgroundPixmap |
the background pixmap of the widget | |
QBrush | backgroundBrush |
the widget's background brush | |
QColorGroup | colorGroup |
the current color group of the widget palette | |
QPalette | palette |
the widget's palette | |
BackgroundOrigin | backgroundOrigin |
the origin of the widget's background | |
bool | ownPalette |
whether the widget uses its own palette | |
QFont | font |
the font currently set for the widget | |
bool | ownFont |
whether the widget uses its own font | |
QCursor | cursor |
the cursor shape for this widget | |
bool | ownCursor |
whether the widget uses its own cursor | |
QString | caption |
the window caption (title) | |
QPixmap | icon |
the widget's icon | |
QString | iconText |
the widget's icon text | |
bool | mouseTracking |
whether mouse tracking is enabled for the widget | |
bool | underMouse |
whether the widget is under the mouse cursor | |
bool | isActiveWindow |
whether this widget is the active window | |
bool | focusEnabled |
whether the widget accepts keyboard focus | |
FocusPolicy | focusPolicy |
the way the widget accepts keyboard focus | |
bool | focus |
whether this widget (or its focus proxy) has the keyboard input focus | |
bool | updatesEnabled |
whether updates are enabled | |
bool | visible |
whether the widget is visible | |
QRect | visibleRect |
the visible rectangle | |
bool | hidden |
whether the widget is explicitly hidden | |
bool | shown |
whether the widget is shown | |
bool | minimized |
whether this widget is minimized (iconified) | |
bool | maximized |
whether this widget is maximized | |
bool | fullScreen |
whether the widget is full screen | |
QSize | sizeHint |
the recommended size for the widget | |
QSize | minimumSizeHint |
the recommended minimum size for the widget | |
QRect | microFocusHint |
the currently set micro focus hint for this widget. | |
bool | acceptDrops |
whether drop events are enabled for this widget | |
bool | autoMask |
whether the auto mask feature is enabled for the widget | |
bool | customWhatsThis |
whether the widget wants to handle What's This help manually | |
bool | inputMethodEnabled |
enables or disables the use of input methods for this widget. | |
double | windowOpacity |
The level of opacity for the window. | |
Amigas | |
class | QApplication |
class | QBaseApplication |
class | QPainter |
class | QFontMetrics |
class | QFontInfo |
class | QETWidget |
class | QLayout |
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 isn't embedded in a parent widget is called a top-level widget. Usually, top-level widgets are windows with a frame and a title bar (although it is also possible to create top-level widgets without such decoration if suitable widget flags are used). In Qt, QMainWindow and the various subclasses of QDialog are the most common top-level windows.
A widget without a parent widget is always a top-level widget.
Non-top-level widgets are child widgets. These are child windows in their parent widgets. You cannot usually distinguish a child widget from its parent visually. Most other widgets in Qt are useful only as child widgets. (It is possible to make, say, a button into a top-level widget, but most people prefer to put their buttons inside other widgets, e.g. QDialog.)
If you want to use a QWidget to hold child widgets you will probably want to add a layout to the parent QWidget. (See Layouts.)
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 QPushButton, QListBox and QTabDialog, etc.
This enum defines the origin used to draw a widget's background pixmap.
The pixmap is drawn using the: WidgetOrigin widget's coordinate system. ParentOrigin parent's coordinate system. WindowOrigin top-level window's coordinate system. AncestorOrigin same origin as the parent uses.
enum QWidget::FocusPolicy |
enum QWidget::FocusPolicy |
This enum type defines the various policies a widget can have with respect to acquiring keyboard focus.
TabFocus the widget accepts focus by tabbing. ClickFocus the widget accepts focus by clicking. StrongFocus the widget accepts focus by both tabbing and clicking. On Mac OS X this will also be indicate that the widget accepts tab focus when in 'Text/List focus mode'. WheelFocus like StrongFocus plus the widget accepts focus by using the mouse wheel. NoFocus the widget does not accept focus.
Constructs a widget which is a child of parent, with the name name and widget flags set to f.
If parent is 0, the new widget becomes a top-level 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 name is sent to the QObject constructor.
The widget flags argument, f, is normally 0, but it can be set to customize the window frame of a top-level widget (i.e. parent must be 0). To customize the frame, set the WStyle_Customize
flag OR'ed with any of the Qt::WidgetFlags.
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.
Example:
QLabel *splashScreen = new QLabel( 0, "mySplashScreen", WStyle_Customize | WStyle_Splash );
QWidget::~QWidget | ( | ) |
Destroys the widget.
All this widget's children are deleted first. The application exits if this widget is the main widget.
QWidget::~QWidget | ( | ) |
bool QWidget::acceptDrops | ( | ) | const |
bool QWidget::acceptDrops | ( | ) | const |
void QWidget::adjustSize | ( | ) | [virtual, slot] |
Adjusts the size of the widget to fit the contents.
Uses sizeHint() if valid (i.e if the size hint's width and height are >= 0), otherwise sets the size to the children rectangle (the union of all child widget geometries).
Reimplementado en QMessageBox y QMessageBox.
virtual void QWidget::adjustSize | ( | ) | [virtual, slot] |
Reimplementado en QMessageBox y QMessageBox.
bool QWidget::autoMask | ( | ) | const |
bool QWidget::autoMask | ( | ) | const |
const QBrush& QWidget::backgroundBrush | ( | ) | const |
const QBrush& QWidget::backgroundBrush | ( | ) | const |
const QColor& QWidget::backgroundColor | ( | ) | const |
const QColor & QWidget::backgroundColor | ( | ) | const |
Use paletteBackgroundColor() or eraseColor() instead.
BackgroundMode QWidget::backgroundMode | ( | ) | const |
BackgroundMode QWidget::backgroundMode | ( | ) | const |
QPoint QWidget::backgroundOffset | ( | ) | const |
QPoint QWidget::backgroundOffset | ( | ) | const |
BackgroundOrigin QWidget::backgroundOrigin | ( | ) | const |
BackgroundOrigin QWidget::backgroundOrigin | ( | ) | const |
const QPixmap* QWidget::backgroundPixmap | ( | ) | const |
const QPixmap * QWidget::backgroundPixmap | ( | ) | const |
Use paletteBackgroundPixmap() or erasePixmap() instead.
QSize QWidget::baseSize | ( | ) | const |
Reimplementado en QWorkspaceChild.
QSize QWidget::baseSize | ( | ) | const |
Reimplementado en QWorkspaceChild.
QString QWidget::caption | ( | ) | const |
Reimplementado en QDockWindowHandle.
QString QWidget::caption | ( | ) | const |
Reimplementado en QDockWindowHandle.
Returns the visible child widget at pixel position (x, y) in the widget's own coordinate system.
If includeThis is TRUE, and there is no child visible at (x, y), the widget itself is returned.
Esta es una función miembro sobrecargada que se suministra por conveniencia. Difiere de la anterior función solamente en los argumentos que acepta. Returns the visible child widget at point p in the widget's own coordinate system.
If includeThis is TRUE, and there is no child visible at p, the widget itself is returned.
QRect QWidget::childrenRect | ( | ) | const |
QRect QWidget::childrenRect | ( | ) | const |
QRegion QWidget::childrenRegion | ( | ) | const |
QRegion QWidget::childrenRegion | ( | ) | const |
void QWidget::clearFocus | ( | ) | [slot] |
void QWidget::clearFocus | ( | ) | [slot] |
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().
void QWidget::clearMask | ( | ) |
void QWidget::clearWFlags | ( | WFlags | f | ) | [inline, protected] |
Clears the widget flags f.
Widget flags are a combination of {Qt::WidgetFlags}.
Reimplementado en QETWidget, QETWidget y QWFlagWidget.
void QWidget::clearWFlags | ( | WFlags | n | ) | [protected] |
Reimplementado en QETWidget, QETWidget y QWFlagWidget.
void QWidget::clearWState | ( | uint | n | ) | [inline, protected] |
Reimplementado en QETWidget, QETWidget y QWFlagWidget.
void QWidget::clearWState | ( | uint | n | ) | [protected] |
Reimplementado en QETWidget, QETWidget y QWFlagWidget.
QRegion QWidget::clipRegion | ( | ) | 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.
QRegion QWidget::clipRegion | ( | ) | const |
bool QWidget::close | ( | void | ) | [inline, 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. The default implementation of QWidget::closeEvent() accepts the close event.
The QApplication::lastWindowClosed() signal is emitted when the last visible top level widget is closed.
Reimplementado en FLFormDB.
Esta es una función miembro sobrecargada que se suministra por conveniencia. Difiere de la anterior función solamente en los argumentos que acepta. Closes this widget. Returns TRUE if the widget was closed; otherwise returns FALSE.
If alsoDelete is TRUE or the widget has the WDestructiveClose
widget flag, the widget is also deleted. The widget can prevent itself from being closed by rejecting the QCloseEvent it gets. 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 top level widget is closed.
Note that closing the QApplication::mainWidget() terminates the application.
void QWidget::closeEvent | ( | QCloseEvent * | e | ) | [protected, virtual] |
This event handler, for event e, can be reimplemented in a subclass to receive widget close events.
The default implementation calls e->accept(), which hides this widget. See the QCloseEvent documentation for more details.
Reimplementado en FLFormDB, FLFormRecordDB, FLFormSearchDB, QDialog, QMessageBox, QPopupMenu, QProgressDialog, QDialog, QMessageBox, QProgressDialog, QAlphaWidget, QRollEffect, QPopupMenu, FormWindow, HierarchyView, MainWindow, PropertyEditor, SourceEditor, Workspace y TrWindow.
virtual void QWidget::closeEvent | ( | QCloseEvent * | ) | [protected, virtual] |
Reimplementado en FLFormDB, FLFormRecordDB, FLFormSearchDB, QDialog, QMessageBox, QPopupMenu, QProgressDialog, QDialog, QMessageBox, QProgressDialog, QAlphaWidget, QRollEffect, QPopupMenu, FormWindow, HierarchyView, MainWindow, PropertyEditor, SourceEditor, Workspace y TrWindow.
const QColorGroup& QWidget::colorGroup | ( | ) | const |
const QColorGroup& QWidget::colorGroup | ( | ) | const |
void QWidget::constPolish | ( | ) | const [inline, slot] |
Ensures that the widget is properly initialized by calling polish().
Call constPolish() from functions like sizeHint() that depends on the widget being initialized, and that may be called before show().
void QWidget::constPolish | ( | ) | const [slot] |
void QWidget::contextMenuEvent | ( | QContextMenuEvent * | e | ) | [protected, virtual] |
This event handler, for event e, can be reimplemented in a subclass to receive widget context menu events.
The default implementation calls e->ignore(), which rejects the context event. See the QContextMenuEvent documentation for more details.
Reimplementado en MarkerWidget, QTitleBar, QDialog, QDockWindow, QLineEdit, QScrollBar, QScrollView, QDialog, QDockWindow, QLineEdit, QScrollBar, QScrollView, QTitleBar, QDesignerToolBar y MarkerWidget.
virtual void QWidget::contextMenuEvent | ( | QContextMenuEvent * | ) | [protected, virtual] |
Reimplementado en MarkerWidget, QTitleBar, QDialog, QDockWindow, QLineEdit, QScrollBar, QScrollView, QDialog, QDockWindow, QLineEdit, QScrollBar, QScrollView, QTitleBar, QDesignerToolBar y MarkerWidget.
void QWidget::create | ( | WId | window = 0 , |
bool | initializeWindow = TRUE , |
||
bool | destroyOldWindow = TRUE |
||
) | [protected, virtual] |
Creates a new widget window if window is null, 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 makes only 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.
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.
virtual void QWidget::create | ( | WId | = 0 , |
bool | initializeWindow = TRUE , |
||
bool | destroyOldWindow = TRUE |
||
) | [protected, virtual] |
const QCursor& QWidget::cursor | ( | ) | const |
Reimplementado en FLDataTable, FLFormDB y QwtPanner.
const QCursor& QWidget::cursor | ( | ) | const |
Reimplementado en FLDataTable, FLFormDB y QwtPanner.
virtual bool QWidget::customWhatsThis | ( | ) | const [virtual] |
Reimplementado en QMenuBar, QPopupMenu, QMenuBar y QPopupMenu.
virtual bool QWidget::customWhatsThis | ( | ) | const [virtual] |
Reimplementado en QMenuBar, QPopupMenu, QMenuBar y QPopupMenu.
void QWidget::destroy | ( | bool | destroyWindow = TRUE , |
bool | destroySubWindows = TRUE |
||
) | [protected, virtual] |
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.
virtual void QWidget::destroy | ( | bool | destroyWindow = TRUE , |
bool | destroySubWindows = TRUE |
||
) | [protected, virtual] |
void QWidget::dragEnterEvent | ( | QDragEnterEvent * | ) | [protected, virtual] |
This event handler is called when a drag is in progress and the mouse enters this widget.
See the Drag-and-drop documentation for an overview of how to provide drag-and-drop in your application.
Reimplementado en QLineEdit, QtMultiLineEdit, QColorWell, QColorShowLabel, QLineEdit, QDesignerToolBar, MenuBarEditor, PopupMenuEditor y StyledButton.
virtual void QWidget::dragEnterEvent | ( | QDragEnterEvent * | ) | [protected, virtual] |
Reimplementado en QLineEdit, QtMultiLineEdit, QColorWell, QColorShowLabel, QLineEdit, QDesignerToolBar, MenuBarEditor, PopupMenuEditor y StyledButton.
void QWidget::dragLeaveEvent | ( | QDragLeaveEvent * | ) | [protected, virtual] |
This event handler is called when a drag is in progress and the mouse leaves this widget.
See the Drag-and-drop documentation for an overview of how to provide drag-and-drop in your application.
Reimplementado en QLineEdit, QtMultiLineEdit, QColorWell, QColorShowLabel, QLineEdit, QDesignerToolBar, MenuBarEditor, PopupMenuEditor y StyledButton.
virtual void QWidget::dragLeaveEvent | ( | QDragLeaveEvent * | ) | [protected, virtual] |
Reimplementado en QLineEdit, QtMultiLineEdit, QColorWell, QColorShowLabel, QLineEdit, QDesignerToolBar, MenuBarEditor, PopupMenuEditor y StyledButton.
void QWidget::dragMoveEvent | ( | QDragMoveEvent * | ) | [protected, virtual] |
This event handler is called when a drag is in progress and the mouse enters this widget, and whenever it moves within the widget.
See the Drag-and-drop documentation for an overview of how to provide drag-and-drop in your application.
Reimplementado en QLineEdit, QtMultiLineEdit, QColorWell, QLineEdit, QDesignerToolBar, MenuBarEditor, PopupMenuEditor y StyledButton.
virtual void QWidget::dragMoveEvent | ( | QDragMoveEvent * | ) | [protected, virtual] |
Reimplementado en QLineEdit, QtMultiLineEdit, QColorWell, QLineEdit, QDesignerToolBar, MenuBarEditor, PopupMenuEditor y StyledButton.
Writes str at position x,y.
The y position is the base line position of the text. The text is drawn using the default font and the default foreground color.
This function is provided for convenience. You will generally get more flexible results and often higher speed by using a a painter instead.
Draws the string str at position (x, y).
The y position is the base line position of the text. The text is drawn using the default font and the default foreground color.
This function is provided for convenience. You will generally get more flexible results and often higher speed by using a a painter instead.
Reimplementado en PaintWidget.
Esta es una función miembro sobrecargada que se suministra por conveniencia. Difiere de la anterior función solamente en los argumentos que acepta.
Esta es una función miembro sobrecargada que se suministra por conveniencia. Difiere de la anterior función solamente en los argumentos que acepta.
Draws the string str at position pos.
Reimplementado en PaintWidget.
void QWidget::dropEvent | ( | QDropEvent * | ) | [protected, virtual] |
This event handler is called when the drag is dropped on this widget.
See the Drag-and-drop documentation for an overview of how to provide drag-and-drop in your application.
Reimplementado en QLineEdit, QtMultiLineEdit, QColorWell, QColorShowLabel, QLineEdit, QDesignerToolBar, MenuBarEditor, PopupMenuEditor y StyledButton.
virtual void QWidget::dropEvent | ( | QDropEvent * | ) | [protected, virtual] |
Reimplementado en QLineEdit, QtMultiLineEdit, QColorWell, QColorShowLabel, QLineEdit, QDesignerToolBar, MenuBarEditor, PopupMenuEditor y StyledButton.
void QWidget::enabledChange | ( | bool | oldEnabled | ) | [protected, virtual] |
This virtual function is called from setEnabled(). oldEnabled is the previous setting; you can get the new setting from isEnabled().
Reimplement this function if your widget needs to know when it becomes enabled or disabled. You will almost certainly need to update the widget using update().
The default implementation repaints the visible part of the widget.
Reimplementado en QButton, QPopupMenu, QButton, QDateTimeSpinWidget y QPopupMenu.
virtual void QWidget::enabledChange | ( | bool | oldEnabled | ) | [protected, virtual] |
Reimplementado en QButton, QPopupMenu, QButton, QDateTimeSpinWidget y QPopupMenu.
void QWidget::enterEvent | ( | QEvent * | ) | [protected, virtual] |
This event handler can be reimplemented in a subclass to receive widget enter events.
An event is sent to the widget when the mouse cursor enters the widget.
Reimplementado en QTitleBar, QIconView, QToolButton, QIconView, QTitleBar, QToolButton y QWorkspaceChild.
virtual void QWidget::enterEvent | ( | QEvent * | ) | [protected, virtual] |
Reimplementado en QTitleBar, QIconView, QToolButton, QIconView, QTitleBar, QToolButton y QWorkspaceChild.
void QWidget::erase | ( | ) | [inline] |
Esta es una función miembro sobrecargada que se suministra por conveniencia. Difiere de la anterior función solamente en los argumentos que acepta.
This version erases the entire widget.
Reimplementado en PaintWidget.
Erases the specified area (x,y,w,h) in the widget without generating a paint event.
If w is negative, it is replaced with width() - x
. If h is negative, it is replaced width height() - y
.
Child widgets are not affected.
Erases the specified area (x, y, w, h) in the widget without generating a paint event.
If w is negative, it is replaced with {width() - x}. If h is negative, it is replaced width
{height() - y}.
Child widgets are not affected.
void QWidget::erase | ( | const QRect & | r | ) | [inline] |
Esta es una función miembro sobrecargada que se suministra por conveniencia. Difiere de la anterior función solamente en los argumentos que acepta.
Esta es una función miembro sobrecargada que se suministra por conveniencia. Difiere de la anterior función solamente en los argumentos que acepta.
Erases the specified area r in the widget without generating a paint event.
void QWidget::erase | ( | const QRegion & | reg | ) |
Erases the area defined by reg, without generating a paint event.
Child widgets are not affected.
Esta es una función miembro sobrecargada que se suministra por conveniencia. Difiere de la anterior función solamente en los argumentos que acepta. Erases the area defined by reg, without generating a paint event.
Child widgets are not affected.
void QWidget::erase | ( | ) |
Reimplementado en PaintWidget.
void QWidget::erase | ( | const QRect & | ) |
void QWidget::erase | ( | const QRegion & | ) |
const QColor& QWidget::eraseColor | ( | ) | const |
const QColor & QWidget::eraseColor | ( | ) | const [inline] |
Returns the erase color of the widget.
const QPixmap * QWidget::erasePixmap | ( | ) | const |
Returns the widget's erase pixmap.
Reimplementado en PaintWidget.
const QPixmap* QWidget::erasePixmap | ( | ) | const |
Reimplementado en PaintWidget.
This is the main event handler; it handles event e. You can reimplement this function in a subclass, but we recommend using one of the specialized event handlers instead.
The main event handler first passes an event through all event filters that have been installed. If none of the filters intercept the event, it calls one of the specialized event handlers.
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().
This function returns TRUE if it is able to pass the event over to someone (i.e. someone wanted the event); otherwise returns FALSE.
Reimplementado de QObject.
Reimplementado en QTitleBar, QButtonGroup, QDateEdit, QTimeEdit, QDockWindow, QGroupBox, QLineEdit, QMainWindow, QSplitter, QStatusBar, QTabBar, QTextEdit, QToolBar, QtMultiLineEdit, QButtonGroup, QDateTimeEditor, QDateEdit, QTimeEdit, QDockWindow, QGroupBox, QLineEdit, QMainWindow, QSplitter, QStatusBar, QTabBar, QTextEdit, QTitleBar, QToolBar, QWorkspaceChild, QDesignerDataBrowser, QDesignerDataView, QDesignerDataBrowser2, QDesignerDataView2, QLayoutWidget, QwtCounter y QwtPlot.
This virtual function receives events to an object and should return TRUE if the event e was recognized and processed.
The event() function can be reimplemented to customize the behavior of an object.
Reimplementado de QObject.
Reimplementado en QTitleBar, QButtonGroup, QDateEdit, QTimeEdit, QDockWindow, QGroupBox, QLineEdit, QMainWindow, QSplitter, QStatusBar, QTabBar, QTextEdit, QToolBar, QtMultiLineEdit, QButtonGroup, QDateTimeEditor, QDateEdit, QTimeEdit, QDockWindow, QGroupBox, QLineEdit, QMainWindow, QSplitter, QStatusBar, QTabBar, QTextEdit, QTitleBar, QToolBar, QWorkspaceChild, QDesignerDataBrowser, QDesignerDataView, QDesignerDataBrowser2, QDesignerDataView2, QLayoutWidget, QwtCounter y QwtPlot.
QWExtra * QWidget::extraData | ( | ) | [protected] |
Reimplementado en QExtraWidget.
QWExtra* QWidget::extraData | ( | ) | [protected] |
Reimplementado en QExtraWidget.
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.
QFocusData* QWidget::focusData | ( | ) | [protected] |
QFocusData * QWidget::focusData | ( | ) | [protected] |
Returns the focus data for this widget's top-level widget.
Focus data always belongs to the top-level widget. The focus data list contains all the widgets in this top-level widget that can accept focus, in tab order. An iterator points to the current focus widget (focusWidget() returns a pointer to this widget).
This information is useful for implementing advanced versions of focusNextPrevChild().
void QWidget::focusInEvent | ( | QFocusEvent * | ) | [protected, virtual] |
This event handler can be reimplemented in a subclass to receive keyboard focus events (focus received) for the widget.
A widget normally must setFocusPolicy() to something other than 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 toplevel widgets that do not specify a focusPolicy() ). It also calls setMicroFocusHint(), hinting any system-specific input tools about the focus of the user's attention.
Reimplementado en VDateTable, FLLineEdit, QButton, QComboBox, QDial, QGroupBox, QIconView, QLineEdit, QListBox, QListView, QMenuBar, QPopupMenu, QPushButton, QSlider, QTabBar, QTable, QtMultiLineEdit, QWellArray, QIconView, QTable, QButton, QComboBox, QDial, QGroupBox, QLineEdit, QListBox, QListView, QMenuBar, QPopupMenu, QPushButton, QSlider, QTabBar, FormWindow y PopupMenuEditor.
virtual void QWidget::focusInEvent | ( | QFocusEvent * | ) | [protected, virtual] |
Reimplementado en VDateTable, FLLineEdit, QButton, QComboBox, QDial, QGroupBox, QIconView, QLineEdit, QListBox, QListView, QMenuBar, QPopupMenu, QPushButton, QSlider, QTabBar, QTable, QtMultiLineEdit, QWellArray, QIconView, QTable, QButton, QComboBox, QDial, QGroupBox, QLineEdit, QListBox, QListView, QMenuBar, QPopupMenu, QPushButton, QSlider, QTabBar, FormWindow y PopupMenuEditor.
Reimplementado en QPopupMenu, QScrollView, QTextEdit, QtMultiLineEdit, QPopupMenu, QScrollView, QTextEdit y QWorkspaceChild.
Finds a new widget to give the keyboard focus to, as appropriate for Tab and Shift+Tab, and returns TRUE if is can find a new widget and FALSE if it can't,
If next is TRUE, this function searches "forwards", if next is FALSE, it searches "backwards".
Sometimes, you will want to reimplement this function. For example, a web browser might reimplement it to move its "current active link" forwards or backwards, and call QWidget::focusNextPrevChild() only when it reaches the last or first link on the "page".
Child widgets call focusNextPrevChild() on their parent widgets, but only the top-level widget decides where to redirect focus. By overriding this method for an object, you thus gain control of focus traversal for all child widgets.
Reimplementado en QPopupMenu, QScrollView, QTextEdit, QtMultiLineEdit, QPopupMenu, QScrollView, QTextEdit y QWorkspaceChild.
void QWidget::focusOutEvent | ( | QFocusEvent * | ) | [protected, virtual] |
This event handler can be reimplemented in a subclass to receive keyboard focus events (focus lost) for the widget.
A widget normally must setFocusPolicy() to something other than 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 toplevel widgets that do not specify a focusPolicy() ). It also calls setMicroFocusHint(), hinting any system-specific input tools about the focus of the user's attention.
Reimplementado en VDateTable, FLDataTable, FLLineEdit, QButton, QComboBox, QDial, QIconView, QLineEdit, QListBox, QListView, QMenuBar, QPopupMenu, QPushButton, QSlider, QTabBar, QTable, QtMultiLineEdit, QWellArray, QRenameEdit, QIconViewItemLineEdit, QIconView, QTable, QButton, QComboBox, QDial, QLineEdit, QListBox, QListView, QMenuBar, QPopupMenu, QPushButton, QSlider, QTabBar, FormWindow, MenuBarEditor y PopupMenuEditor.
virtual void QWidget::focusOutEvent | ( | QFocusEvent * | ) | [protected, virtual] |
Reimplementado en VDateTable, FLDataTable, FLLineEdit, QButton, QComboBox, QDial, QIconView, QLineEdit, QListBox, QListView, QMenuBar, QPopupMenu, QPushButton, QSlider, QTabBar, QTable, QtMultiLineEdit, QWellArray, QRenameEdit, QIconViewItemLineEdit, QIconView, QTable, QButton, QComboBox, QDial, QLineEdit, QListBox, QListView, QMenuBar, QPopupMenu, QPushButton, QSlider, QTabBar, FormWindow, MenuBarEditor y PopupMenuEditor.
FocusPolicy QWidget::focusPolicy | ( | ) | const |
FocusPolicy QWidget::focusPolicy | ( | ) | const |
QWidget* QWidget::focusProxy | ( | ) | const |
QWidget * QWidget::focusProxy | ( | ) | const |
Returns the focus proxy, or 0 if there is no focus proxy.
QWidget * QWidget::focusWidget | ( | ) | const |
Returns the focus widget in this widget's window. This is not the same as QApplication::focusWidget(), which returns the focus widget in the currently active window.
QWidget* QWidget::focusWidget | ( | ) | const |
void QWidget::fontChange | ( | const QFont & | oldFont | ) | [protected, virtual] |
This virtual function is called from setFont(). oldFont is the previous font; you can get the new font from font().
Reimplement this function if your widget needs to know when its font changes. You will almost certainly need to update the widget using update().
The default implementation updates the widget including its geometry.
Reimplementado en QGroupBox, QHeader, QLabel, QMenuBar, QScrollView, QTabBar, QGroupBox, QHeader, QLabel, QMenuBar, QScrollView, QTabBar, EditorPage, QwtScaleWidget, QwtSlider y QwtThermo.
virtual void QWidget::fontChange | ( | const QFont & | ) | [protected, virtual] |
Reimplementado en QGroupBox, QHeader, QLabel, QMenuBar, QScrollView, QTabBar, QGroupBox, QHeader, QLabel, QMenuBar, QScrollView, QTabBar, EditorPage, QwtScaleWidget, QwtSlider y QwtThermo.
QFontInfo QWidget::fontInfo | ( | ) | const |
QFontInfo QWidget::fontInfo | ( | ) | const [inline] |
Returns the font info for the widget's current font. Equivalent to QFontInto(widget->font()).
QFontMetrics QWidget::fontMetrics | ( | ) | const |
QFontMetrics QWidget::fontMetrics | ( | ) | const [inline] |
Returns the font metrics for the widget's current font. Equivalent to QFontMetrics(widget->font()).
const QColor& QWidget::foregroundColor | ( | ) | const |
const QColor & QWidget::foregroundColor | ( | ) | const |
Same as paletteForegroundColor()
QRect QWidget::frameGeometry | ( | ) | const |
QRect QWidget::frameGeometry | ( | ) | const |
QSize QWidget::frameSize | ( | ) | const |
QSize QWidget::frameSize | ( | ) | const |
const QRect& QWidget::geometry | ( | ) | const |
const QRect& QWidget::geometry | ( | ) | const |
Qt::WFlags QWidget::getWFlags | ( | ) | const [inline, protected] |
Returns the widget flags for this this widget.
Widget flags are a combination of {Qt::WidgetFlags}.
WFlags QWidget::getWFlags | ( | ) | const [protected] |
uint QWidget::getWState | ( | ) | const [inline, protected] |
uint QWidget::getWState | ( | ) | const [protected] |
void QWidget::grabKeyboard | ( | ) |
void QWidget::grabKeyboard | ( | ) |
Grabs all keyboard input.
This widget will receive all keyboard events, independent of the active window.
Grabs the keyboard input.
This widget reveives 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.
void QWidget::grabMouse | ( | ) |
void QWidget::grabMouse | ( | const QCursor & | ) |
void QWidget::grabMouse | ( | const QCursor & | cursor | ) |
Grabs the mouse input and changes the cursor shape.
The cursor will assume shape cursor (for as long as the mouse focus is grabbed) and this widget will be the only one to receive mouse events until releaseMouse() is called().
Esta es una función miembro sobrecargada que se suministra por conveniencia. Difiere de la anterior función solamente en los argumentos que acepta. Grabs the mouse input and changes the cursor shape.
The cursor will assume shape cursor (for as long as the mouse focus is grabbed) and this widget will be the only one to receive mouse events until releaseMouse() is called().
void QWidget::grabMouse | ( | ) |
Grabs the mouse input.
This widget will be the only one to receive mouse events until releaseMouse() is called.
It is almost never necessary to grab the mouse when using Qt since Qt grabs and releases it sensibly. In particular, Qt grabs the mouse when a button is pressed and keeps it until the last button is released.
Beware that only widgets actually shown on the screen may grab the mouse input.
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.
Note that only visible widgets can grab mouse input. If isVisible() returns FALSE for a widget, that widget cannot call grabMouse().
bool QWidget::hasFocus | ( | ) | const |
bool QWidget::hasFocus | ( | ) | const |
bool QWidget::hasMouse | ( | ) | const |
bool QWidget::hasMouse | ( | ) | const [inline] |
bool QWidget::hasMouseTracking | ( | ) | const |
bool QWidget::hasMouseTracking | ( | ) | const [inline] |
int QWidget::height | ( | ) | const |
int QWidget::height | ( | ) | const |
Returns the preferred height for this widget, given the width w. The default implementation returns 0, indicating that the preferred height does not depend on the width.
Reimplementado en QLabel, QMenuBar, QTextEdit, QLabel, QMenuBar, QTextEdit, MenuBarEditor, QwtLegend y QwtTextLabel.
Reimplementado en QLabel, QMenuBar, QTextEdit, QLabel, QMenuBar, QTextEdit, MenuBarEditor, QwtLegend y QwtTextLabel.
void QWidget::hide | ( | ) | [virtual, slot] |
Hides the widget.
You almost never have to reimplement this function. If you need to do something after a widget is hidden, use hideEvent() instead.
Reimplementado en FLFormSearchDB, QComboBox, QDialog, QMainWindow, QMenuBar, QPopupMenu, QToolBar, QDialog, QComboBox, QMainWindow, QMenuBar, QPopupMenu, QToolBar y QWhatsThat.
virtual void QWidget::hide | ( | ) | [virtual, slot] |
Reimplementado en FLFormSearchDB, QComboBox, QDialog, QMainWindow, QMenuBar, QPopupMenu, QToolBar, QDialog, QComboBox, QMainWindow, QMenuBar, QPopupMenu, QToolBar y QWhatsThat.
void QWidget::hideEvent | ( | QHideEvent * | ) | [protected, virtual] |
This event handler can be reimplemented in a subclass to receive widget hide events.
Hide events are sent to widgets immediately after they have been hidden.
Reimplementado en FLFormDB, QDockWindow, QScrollBar, QWorkspace, QDockWindow, QScrollBar, QWorkspace y QwtPlotCanvas.
virtual void QWidget::hideEvent | ( | QHideEvent * | ) | [protected, virtual] |
Reimplementado en FLFormDB, QDockWindow, QScrollBar, QWorkspace, QDockWindow, QScrollBar, QWorkspace y QwtPlotCanvas.
const QPixmap* QWidget::icon | ( | ) | const |
Reimplementado en QMessageBox y QMessageBox.
const QPixmap* QWidget::icon | ( | ) | const |
Reimplementado en QMessageBox y QMessageBox.
void QWidget::iconify | ( | ) | [inline, slot] |
void QWidget::iconify | ( | ) | [inline, slot] |
QString QWidget::iconText | ( | ) | const |
QString QWidget::iconText | ( | ) | const |
void QWidget::imComposeEvent | ( | QIMEvent * | e | ) | [protected, virtual] |
This event handler, for event e, can be reimplemented in a subclass to receive Input Method composition events. This handler is called when the user has entered some text using an Input Method.
The default implementation calls e->ignore(), which rejects the Input Method event. See the QIMEvent documentation for more details.
Reimplementado en QLineEdit, QTextEdit, QLineEdit y QTextEdit.
virtual void QWidget::imComposeEvent | ( | QIMEvent * | ) | [protected, virtual] |
void QWidget::imEndEvent | ( | QIMEvent * | e | ) | [protected, virtual] |
This event handler, for event e, can be reimplemented in a subclass to receive Input Method composition events. This handler is called when the user has finished inputting text via an Input Method.
The default implementation calls e->ignore(), which rejects the Input Method event. See the QIMEvent documentation for more details.
Reimplementado en QLineEdit, QTextEdit, QLineEdit y QTextEdit.
virtual void QWidget::imEndEvent | ( | QIMEvent * | ) | [protected, virtual] |
void QWidget::imStartEvent | ( | QIMEvent * | e | ) | [protected, virtual] |
This event handler, for event e, can be reimplemented in a subclass to receive Input Method composition events. This handler is called when the user begins entering text using an Input Method.
The default implementation calls e->ignore(), which rejects the Input Method event. See the QIMEvent documentation for more details.
Reimplementado en QLineEdit, QTextEdit, QLineEdit y QTextEdit.
virtual void QWidget::imStartEvent | ( | QIMEvent * | ) | [protected, virtual] |
bool QWidget::isActiveWindow | ( | ) | const |
bool QWidget::isActiveWindow | ( | ) | const |
bool QWidget::isDesktop | ( | ) | const |
bool QWidget::isDesktop | ( | ) | const |
bool QWidget::isDialog | ( | ) | const |
bool QWidget::isDialog | ( | ) | 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().
bool QWidget::isEnabledToTLW | ( | ) | const |
bool QWidget::isEnabledToTLW | ( | ) | const [inline] |
This function is deprecated. It is equivalent to isEnabled()
bool QWidget::isFocusEnabled | ( | ) | const |
bool QWidget::isFocusEnabled | ( | ) | const [inline] |
bool QWidget::isFullScreen | ( | ) | const |
bool QWidget::isFullScreen | ( | ) | const |
bool QWidget::isHidden | ( | ) | const [inline] |
bool QWidget::isHidden | ( | ) | const |
bool QWidget::isInputMethodEnabled | ( | ) | const |
bool QWidget::isInputMethodEnabled | ( | ) | const [inline] |
bool QWidget::isMaximized | ( | ) | const |
bool QWidget::isMaximized | ( | ) | const |
bool QWidget::isMinimized | ( | ) | const |
bool QWidget::isMinimized | ( | ) | const |
bool QWidget::isModal | ( | ) | const |
Reimplementado en QDialog, QDialog, QDesignerWizard y QDesignerDialog.
bool QWidget::isModal | ( | ) | const |
Reimplementado en QDialog, QDialog, QDesignerWizard y QDesignerDialog.
bool QWidget::isPopup | ( | ) | const |
bool QWidget::isPopup | ( | ) | const |
bool QWidget::isShown | ( | ) | const [inline] |
bool QWidget::isShown | ( | ) | const |
bool QWidget::isTopLevel | ( | ) | const |
bool QWidget::isTopLevel | ( | ) | const |
bool QWidget::isUpdatesEnabled | ( | ) | const |
bool QWidget::isUpdatesEnabled | ( | ) | const [inline] |
bool QWidget::isVisible | ( | ) | const [inline] |
bool QWidget::isVisible | ( | ) | 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().
bool QWidget::isVisibleToTLW | ( | ) | const [inline] |
This function is deprecated. It is equivalent to isVisible()
bool QWidget::isVisibleToTLW | ( | ) | const |
QWidget * QWidget::keyboardGrabber | ( | ) | [static] |
Returns a pointer to the widget that is currently grabbing the keyboard input.
If no widget in this application is currently grabbing the keyboard, 0 is returned.
Returns the widget that is currently grabbing the keyboard input.
If no widget in this application is currently grabbing the keyboard, 0 is returned.
static QWidget* QWidget::keyboardGrabber | ( | ) | [static] |
void QWidget::keyPressEvent | ( | QKeyEvent * | e | ) | [protected, virtual] |
This event handler, for event e, 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 explicitly ignore the event if you do not understand it, so that the widget's parent can interpret it; otherwise, the event will be implicitly accepted. Although top-level widgets are able to choose whether to accept or ignore unknown events because they have no parent widgets that could otherwise handle them, it is good practice to explicitly ignore events to make widgets as reusable as possible.
The default implementation closes popup widgets if the user presses Esc. Otherwise the event is ignored.
Reimplementado en VPopupFrame, VDateTable, Editor, QButton, QComboBox, QDataTable, QDial, QDialog, QFileDialog, QHeader, QIconView, QLineEdit, QListBox, QListView, QMenuBar, QMessageBox, QPopupMenu, QScrollBar, QSlider, QTabBar, QTable, QTextBrowser, QTextEdit, QtMultiLineEdit, QWellArray, QDialog, QRenameEdit, QFileDialog, QMessageBox, QIconViewItemLineEdit, QIconView, QDataTable, QTable, QButton, QComboBox, QDial, QDockWindowHandle, QDockWindowTitleBar, QHeader, QLineEdit, QListBox, QListView, QMenuBar, QPopupMenu, QScrollBar, QSlider, QTabBar, QTextBrowser, QTextEdit, QWhatsThat, HierarchyList, MenuBarEditor, PopupMenuEditor, EnumPopup, EnumBox, Editor, PhraseBookBox, QwtAbstractSlider, QwtArrowButton, QwtCompass, QwtCounter, QwtDial y QwtLegendItem.
virtual void QWidget::keyPressEvent | ( | QKeyEvent * | ) | [protected, virtual] |
Reimplementado en VPopupFrame, VDateTable, Editor, QButton, QComboBox, QDataTable, QDial, QDialog, QFileDialog, QHeader, QIconView, QLineEdit, QListBox, QListView, QMenuBar, QMessageBox, QPopupMenu, QScrollBar, QSlider, QTabBar, QTable, QTextBrowser, QTextEdit, QtMultiLineEdit, QWellArray, QDialog, QRenameEdit, QFileDialog, QMessageBox, QIconViewItemLineEdit, QIconView, QDataTable, QTable, QButton, QComboBox, QDial, QDockWindowHandle, QDockWindowTitleBar, QHeader, QLineEdit, QListBox, QListView, QMenuBar, QPopupMenu, QScrollBar, QSlider, QTabBar, QTextBrowser, QTextEdit, QWhatsThat, HierarchyList, MenuBarEditor, PopupMenuEditor, EnumPopup, EnumBox, Editor, PhraseBookBox, QwtAbstractSlider, QwtArrowButton, QwtCompass, QwtCounter, QwtDial y QwtLegendItem.
void QWidget::keyReleaseEvent | ( | QKeyEvent * | e | ) | [protected, virtual] |
This event handler, for event e, 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 ignore() the release if you do not understand it, so that the widget's parent can interpret it.
The default implementation ignores the event.
Reimplementado en QButton, QHeader, QButton, QDockWindowHandle, QDockWindowTitleBar, QHeader, HierarchyList y QwtLegendItem.
virtual void QWidget::keyReleaseEvent | ( | QKeyEvent * | ) | [protected, virtual] |
Reimplementado en QButton, QHeader, QButton, QDockWindowHandle, QDockWindowTitleBar, QHeader, HierarchyList y QwtLegendItem.
QLayout * QWidget::layout | ( | ) | const [inline] |
Returns the layout engine that manages the geometry of this widget's children.
If the widget does not have a layout, layout() returns 0.
QLayout* QWidget::layout | ( | ) | const [inline] |
virtual void QWidget::leaveEvent | ( | QEvent * | ) | [protected, virtual] |
Reimplementado en QTitleBar, QMenuBar, QPopupMenu, QSpinBox, QToolButton, QtMultiLineEdit, QMenuBar, QPopupMenu, QSpinBox, QTitleBar, QToolButton y QWorkspaceChild.
void QWidget::leaveEvent | ( | QEvent * | ) | [protected, virtual] |
This event handler can be reimplemented in a subclass to receive widget leave events.
A leave event is sent to the widget when the mouse cursor leaves the widget.
Reimplementado en QTitleBar, QMenuBar, QPopupMenu, QSpinBox, QToolButton, QtMultiLineEdit, QMenuBar, QPopupMenu, QSpinBox, QTitleBar, QToolButton y QWorkspaceChild.
void QWidget::lower | ( | ) | [slot] |
Lowers the widget to the bottom of the parent widget's stack.
If there are siblings of this widget that overlap it on the screen, this widget will be obscured by its siblings afterwards.
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.
void QWidget::lower | ( | ) | [slot] |
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.
Translates the global screen coordinate pos to widget coordinates.
Translates the global screen coordinate pos to widget coordinates.
Translates the parent widget coordinate pos to widget coordinates.
Same as mapFromGlobal() if the widget has no parent.
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.
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.
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.
Translates the widget coordinate pos to a coordinate in the parent widget.
Same as mapToGlobal() if the widget has no parent.
int QWidget::maximumHeight | ( | ) | const |
int QWidget::maximumHeight | ( | ) | const |
QSize QWidget::maximumSize | ( | ) | const |
QSize QWidget::maximumSize | ( | ) | const |
int QWidget::maximumWidth | ( | ) | const |
int QWidget::maximumWidth | ( | ) | const |
Internal implementation of the virtual QPaintDevice::metric() function.
Use the QPaintDeviceMetrics class instead.
Internal implementation of the virtual QPaintDevice::metric() function.
Use the QPaintDeviceMetrics class instead.
m is the metric to get.
Reimplementado de QPaintDevice.
Internal virtual function that returns paint device metrics.
Please use the QPaintDeviceMetrics class instead.
Reimplementado de QPaintDevice.
QRect QWidget::microFocusHint | ( | ) | const |
QRect QWidget::microFocusHint | ( | ) | const |
int QWidget::minimumHeight | ( | ) | const |
int QWidget::minimumHeight | ( | ) | const |
QSize QWidget::minimumSize | ( | ) | const |
Reimplementado en QDockWindow, QMenuBar, QToolBar, QDockWindowHandle, QDockWindow, QMenuBar, QToolBar, Spacer y MenuBarEditor.
QSize QWidget::minimumSize | ( | ) | const |
Reimplementado en QDockWindow, QMenuBar, QToolBar, QDockWindowHandle, QDockWindow, QMenuBar, QToolBar, Spacer y MenuBarEditor.
virtual QSize QWidget::minimumSizeHint | ( | ) | const [virtual] |
Reimplementado en QSEditor, QDialogButtons, QDateEdit, QTimeEdit, QDateTimeEdit, QDial, QDialog, QDockWindow, QIconView, QLabel, QLineEdit, QListBox, QListView, QMainWindow, QMenuBar, QProgressBar, QScrollView, QSlider, QSpinBox, QSplitter, QTabBar, QTabWidget, QToolBar, QToolButton, QWidgetStack, QtMultiLineEdit, QDialog, QErrorMessageTextView, QIconView, QDateEdit, QTimeEdit, QDateTimeEdit, QDial, QDialogButtons, QDockWindowHandle, QDockWindow, QLabel, QLineEdit, QListBox, QListView, QMainWindow, QMenuBar, QProgressBar, QScrollView, QSlider, QSpinBox, QSplitter, QTabBar, QTabWidget, QToolBar, QToolBoxButton, QToolButton, QWidgetStack, QWorkspaceChild, MenuBarEditor, StyledButton, QwtArrowButton, QwtDial, QwtKnob, QwtPlot, QwtScaleWidget, QwtSlider, QwtTextLabel, QwtThermo y QwtWheel.
virtual QSize QWidget::minimumSizeHint | ( | ) | const [virtual] |
Reimplementado en QSEditor, QDialogButtons, QDateEdit, QTimeEdit, QDateTimeEdit, QDial, QDialog, QDockWindow, QIconView, QLabel, QLineEdit, QListBox, QListView, QMainWindow, QMenuBar, QProgressBar, QScrollView, QSlider, QSpinBox, QSplitter, QTabBar, QTabWidget, QToolBar, QToolButton, QWidgetStack, QtMultiLineEdit, QDialog, QErrorMessageTextView, QIconView, QDateEdit, QTimeEdit, QDateTimeEdit, QDial, QDialogButtons, QDockWindowHandle, QDockWindow, QLabel, QLineEdit, QListBox, QListView, QMainWindow, QMenuBar, QProgressBar, QScrollView, QSlider, QSpinBox, QSplitter, QTabBar, QTabWidget, QToolBar, QToolBoxButton, QToolButton, QWidgetStack, QWorkspaceChild, MenuBarEditor, StyledButton, QwtArrowButton, QwtDial, QwtKnob, QwtPlot, QwtScaleWidget, QwtSlider, QwtTextLabel, QwtThermo y QwtWheel.
int QWidget::minimumWidth | ( | ) | const |
int QWidget::minimumWidth | ( | ) | const |
virtual void QWidget::mouseDoubleClickEvent | ( | QMouseEvent * | ) | [protected, virtual] |
Reimplementado en QTitleBar, QComboBox, QHeader, QLineEdit, QListBox, QScrollView, QtMultiLineEdit, QTableHeader, QComboBox, QDockWindowHandle, QDockWindowTitleBar, QHeader, QLineEdit, QListBox, QScrollView, QTitleBar, FormWindow, MenuBarEditor y PopupMenuEditor.
void QWidget::mouseDoubleClickEvent | ( | QMouseEvent * | e | ) | [protected, virtual] |
This event handler, for event e, can be reimplemented in a subclass to receive mouse double click events for the widget.
The default implementation generates a normal mouse press event.
Note that the widgets gets a mousePressEvent() and a mouseReleaseEvent() before the mouseDoubleClickEvent().
Reimplementado en QTitleBar, QComboBox, QHeader, QLineEdit, QListBox, QScrollView, QtMultiLineEdit, QTableHeader, QComboBox, QDockWindowHandle, QDockWindowTitleBar, QHeader, QLineEdit, QListBox, QScrollView, QTitleBar, FormWindow, MenuBarEditor y PopupMenuEditor.
QWidget * QWidget::mouseGrabber | ( | ) | [static] |
Returns a pointer to the widget that is currently grabbing the mouse input.
If no widget in this application is currently grabbing the mouse, 0 is returned.
Returns the widget that is currently grabbing the mouse input.
If no widget in this application is currently grabbing the mouse, 0 is returned.
static QWidget* QWidget::mouseGrabber | ( | ) | [static] |
void QWidget::mouseMoveEvent | ( | QMouseEvent * | e | ) | [protected, virtual] |
This event handler, for event e, 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.
Reimplementado en FLImageViewer, QTitleBar, QButton, QComboBox, QDial, QHeader, QLineEdit, QListBox, QMenuBar, QPopupMenu, QSpinWidget, QScrollBar, QScrollView, QSizeGrip, QSlider, QTabBar, QtMultiLineEdit, QWellArray, QColorWell, QColorPicker, QColorLuminancePicker, QColorShowLabel, QSizeGrip, QTableHeader, QButton, QComboBox, QDial, QDockWindowResizeHandle, QDockWindowHandle, QDockWindowTitleBar, QHeader, QLineEdit, QListBox, QHideDock, QMenuBar, QPopupMenu, QSpinWidget, QScrollBar, QScrollView, QSlider, QSplitterHandle, QTabBar, QTitleBar, QWhatsThat, MenuBarEditor, PopupMenuEditor, SizeHandle, StyledButton y QwtAbstractSlider.
virtual void QWidget::mouseMoveEvent | ( | QMouseEvent * | ) | [protected, virtual] |
Reimplementado en FLImageViewer, QTitleBar, QButton, QComboBox, QDial, QHeader, QLineEdit, QListBox, QMenuBar, QPopupMenu, QSpinWidget, QScrollBar, QScrollView, QSizeGrip, QSlider, QTabBar, QtMultiLineEdit, QWellArray, QColorWell, QColorPicker, QColorLuminancePicker, QColorShowLabel, QSizeGrip, QTableHeader, QButton, QComboBox, QDial, QDockWindowResizeHandle, QDockWindowHandle, QDockWindowTitleBar, QHeader, QLineEdit, QListBox, QHideDock, QMenuBar, QPopupMenu, QSpinWidget, QScrollBar, QScrollView, QSlider, QSplitterHandle, QTabBar, QTitleBar, QWhatsThat, MenuBarEditor, PopupMenuEditor, SizeHandle, StyledButton y QwtAbstractSlider.
void QWidget::mousePressEvent | ( | QMouseEvent * | e | ) | [protected, virtual] |
This event handler, for event e, 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.
Reimplementado en FLImageViewer, MarkerWidget, QTitleBar, QButton, QComboBox, QDial, QHeader, QLineEdit, QListBox, QMenuBar, QPopupMenu, QSpinWidget, QScrollBar, QScrollView, QSizeGrip, QSlider, QSplashScreen, QTabBar, QToolButton, QtMultiLineEdit, QWellArray, QColorWell, QColorPicker, QColorLuminancePicker, QColorShowLabel, QSizeGrip, QTableHeader, QButton, QComboBox, QDateTimeEditor, QDial, QDockWindowResizeHandle, QDockWindowHandle, QDockWindowTitleBar, QHeader, QLineEdit, QListBox, QHideDock, QMenuBar, QPopupMenu, QSpinWidget, QScrollBar, QScrollView, QSlider, QSplashScreen, QSplitterHandle, QTabBar, QTextDetailPopup, QTitleBar, QToolButton, QWhatsThat, QDesignerToolBar, MenuBarEditor, OrderIndicator, PopupMenuEditor, EnumBox, SizeHandle, StyledButton, MarkerWidget, QwtAbstractSlider y QwtLegendItem.
virtual void QWidget::mousePressEvent | ( | QMouseEvent * | ) | [protected, virtual] |
Reimplementado en FLImageViewer, MarkerWidget, QTitleBar, QButton, QComboBox, QDial, QHeader, QLineEdit, QListBox, QMenuBar, QPopupMenu, QSpinWidget, QScrollBar, QScrollView, QSizeGrip, QSlider, QSplashScreen, QTabBar, QToolButton, QtMultiLineEdit, QWellArray, QColorWell, QColorPicker, QColorLuminancePicker, QColorShowLabel, QSizeGrip, QTableHeader, QButton, QComboBox, QDateTimeEditor, QDial, QDockWindowResizeHandle, QDockWindowHandle, QDockWindowTitleBar, QHeader, QLineEdit, QListBox, QHideDock, QMenuBar, QPopupMenu, QSpinWidget, QScrollBar, QScrollView, QSlider, QSplashScreen, QSplitterHandle, QTabBar, QTextDetailPopup, QTitleBar, QToolButton, QWhatsThat, QDesignerToolBar, MenuBarEditor, OrderIndicator, PopupMenuEditor, EnumBox, SizeHandle, StyledButton, MarkerWidget, QwtAbstractSlider y QwtLegendItem.
virtual void QWidget::mouseReleaseEvent | ( | QMouseEvent * | ) | [protected, virtual] |
Reimplementado en FLImageViewer, QTitleBar, QButton, QComboBox, QDial, QHeader, QLineEdit, QListBox, QMenuBar, QPopupMenu, QSpinWidget, QScrollBar, QScrollView, QSlider, QTabBar, QtMultiLineEdit, QWellArray, QColorWell, QColorShowLabel, QTableHeader, QButton, QComboBox, QDial, QDockWindowResizeHandle, QDockWindowHandle, QDockWindowTitleBar, QHeader, QLineEdit, QListBox, QHideDock, QMenuBar, QPopupMenu, QSpinWidget, QScrollBar, QScrollView, QSlider, QSplitterHandle, QTabBar, QTitleBar, QWhatsThat, QDesignerToolBar, SizeHandle, PageCurl, QwtAbstractSlider y QwtLegendItem.
void QWidget::mouseReleaseEvent | ( | QMouseEvent * | e | ) | [protected, virtual] |
This event handler, for event e, can be reimplemented in a subclass to receive mouse release events for the widget.
Reimplementado en FLImageViewer, QTitleBar, QButton, QComboBox, QDial, QHeader, QLineEdit, QListBox, QMenuBar, QPopupMenu, QSpinWidget, QScrollBar, QScrollView, QSlider, QTabBar, QtMultiLineEdit, QWellArray, QColorWell, QColorShowLabel, QTableHeader, QButton, QComboBox, QDial, QDockWindowResizeHandle, QDockWindowHandle, QDockWindowTitleBar, QHeader, QLineEdit, QListBox, QHideDock, QMenuBar, QPopupMenu, QSpinWidget, QScrollBar, QScrollView, QSlider, QSplitterHandle, QTabBar, QTitleBar, QWhatsThat, QDesignerToolBar, SizeHandle, PageCurl, QwtAbstractSlider y QwtLegendItem.
Esta es una función miembro sobrecargada que se suministra por conveniencia. Difiere de la anterior función solamente en los argumentos que acepta. This corresponds to move( QPoint(x, y) ).
Reimplementado en QDialog, QPushButton, QDialog, QPushButton y QWorkspaceChild.
void QWidget::move | ( | const QPoint & | p | ) | [inline, slot] |
Reimplementado en QDialog, QPushButton, QDialog y QPushButton.
Reimplementado en QDialog, QPushButton, QDialog, QPushButton y QWorkspaceChild.
void QWidget::move | ( | const QPoint & | ) | [slot] |
Reimplementado en QDialog, QPushButton, QDialog y QPushButton.
virtual void QWidget::moveEvent | ( | QMoveEvent * | ) | [protected, virtual] |
Reimplementado en QToolButton, QToolButton y QWorkspaceChild.
void QWidget::moveEvent | ( | QMoveEvent * | ) | [protected, virtual] |
This event handler can be reimplemented in a subclass to receive widget move events. When the widget receives this event, it is already at the new position.
The old position is accessible through QMoveEvent::oldPos().
Reimplementado en QToolButton, QToolButton y QWorkspaceChild.
bool QWidget::ownCursor | ( | ) | const |
bool QWidget::ownCursor | ( | ) | const |
bool QWidget::ownFont | ( | ) | const |
bool QWidget::ownFont | ( | ) | const |
bool QWidget::ownPalette | ( | ) | const |
bool QWidget::ownPalette | ( | ) | const |
virtual void QWidget::paintEvent | ( | QPaintEvent * | ) | [protected, virtual] |
Reimplementado en FLWorkspace, FLWidget, FLImageViewer, MPageDisplay, MReportViewer, PaintWidget, MarkerWidget, QAquaFocusWidget, QTitleBar, QButton, QComboBox, QDial, QFrame, QGLWidget, QGroupBox, QHeader, QMainWindow, QPopupMenu, QSpinWidget, QScrollBar, QSizeGrip, QSlider, QStatusBar, QTabBar, QTabDialog, QTable, QCornerSquare, QtTableView, QColorLuminancePicker, QFDProgressAnimation, QTabDialog, QMacCursorWidget, QSizeGrip, QGLWidget, QAquaFocusWidget, QTableHeader, QTable, QButton, QComboBox, QDateTimeEditor, QDial, QDockWindowResizeHandle, QDockWindowHandle, QAlphaWidget, QRollEffect, QFrame, QGroupBox, QHeader, QHideDock, QMainWindow, QPopupMenu, QSpinWidget, QScrollBar, QSlider, QSplitterHandle, QStatusBar, QTabBar, QTabBarBase, QTitleBar, QToolBarSeparator, QWhatsThat, QDesignerToolBarSeparator, QDesignerToolBar, Spacer, MenuBarEditor, OrderIndicator, PopupMenuEditor, PreviewWorkspace, EnumBox, SizeHandle, QLayoutWidget, CustomWidget, QDesignerWidget, QDesignerDialog, MarkerWidget, ShadowWidget, QwtDial, QwtKnob, QwtLegendItem, QwtPanner, QwtPicker::PickerWidget, QwtPlotCanvas, QwtScaleWidget, QwtSlider, QwtTextLabel, QwtThermo y QwtWheel.
void QWidget::paintEvent | ( | QPaintEvent * | ) | [protected, virtual] |
This event handler can be reimplemented in a subclass to receive paint events.
A paint event is a request to repaint all or part of the widget. It can happen as a result of repaint() or update(), or because the widget was obscured and has now been uncovered, or for many other 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 QCanvas 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::unite()). repaint() does not permit this optimization, so we suggest using update() when possible.
When the paint event occurs, the update region has normally been erased, so that you're painting on the widget's background. There are a couple of exceptions and QPaintEvent::erased() tells you whether the widget has been erased or not.
The background can be set using setBackgroundMode(), setPaletteBackgroundColor() or setBackgroundPixmap(). The documentation for setBackgroundMode() elaborates on the background; we recommend reading it.
Reimplementado en FLWorkspace, FLWidget, FLImageViewer, MPageDisplay, MReportViewer, PaintWidget, MarkerWidget, QAquaFocusWidget, QTitleBar, QButton, QComboBox, QDial, QFrame, QGLWidget, QGroupBox, QHeader, QMainWindow, QPopupMenu, QSpinWidget, QScrollBar, QSizeGrip, QSlider, QStatusBar, QTabBar, QTabDialog, QTable, QCornerSquare, QtTableView, QColorLuminancePicker, QFDProgressAnimation, QTabDialog, QMacCursorWidget, QSizeGrip, QGLWidget, QAquaFocusWidget, QTableHeader, QTable, QButton, QComboBox, QDateTimeEditor, QDial, QDockWindowResizeHandle, QDockWindowHandle, QAlphaWidget, QRollEffect, QFrame, QGroupBox, QHeader, QHideDock, QMainWindow, QPopupMenu, QSpinWidget, QScrollBar, QSlider, QSplitterHandle, QStatusBar, QTabBar, QTabBarBase, QTitleBar, QToolBarSeparator, QWhatsThat, QDesignerToolBarSeparator, QDesignerToolBar, Spacer, MenuBarEditor, OrderIndicator, PopupMenuEditor, PreviewWorkspace, EnumBox, SizeHandle, QLayoutWidget, CustomWidget, QDesignerWidget, QDesignerDialog, MarkerWidget, ShadowWidget, QwtDial, QwtKnob, QwtLegendItem, QwtPanner, QwtPicker::PickerWidget, QwtPlotCanvas, QwtScaleWidget, QwtSlider, QwtTextLabel, QwtThermo y QwtWheel.
const QPalette& QWidget::palette | ( | ) | const |
const QPalette& QWidget::palette | ( | ) | const |
const QColor& QWidget::paletteBackgroundColor | ( | ) | const |
const QColor& QWidget::paletteBackgroundColor | ( | ) | const |
const QPixmap* QWidget::paletteBackgroundPixmap | ( | ) | const |
const QPixmap* QWidget::paletteBackgroundPixmap | ( | ) | const |
virtual void QWidget::paletteChange | ( | const QPalette & | ) | [protected, virtual] |
Reimplementado en QToolButton, QToolButton y QwtWheel.
void QWidget::paletteChange | ( | const QPalette & | oldPalette | ) | [protected, virtual] |
This virtual function is called from setPalette(). oldPalette is the previous palette; you can get the new palette from palette().
Reimplement this function if your widget needs to know when its palette changes.
Reimplementado en QToolButton, QToolButton y QwtWheel.
const QColor& QWidget::paletteForegroundColor | ( | ) | const |
const QColor& QWidget::paletteForegroundColor | ( | ) | const |
Returns the parent of this widget, or 0 if it does not have any parent widget. If sameWindow is TRUE and the widget is top level returns 0; otherwise returns the widget's parent.
void QWidget::polish | ( | ) | [virtual, slot] |
Delayed initialization of a widget.
This function will be called after a widget has been fully created and before it is shown the very first time.
Polishing is useful for final initialization which depends on having an instantiated widget. This is something a constructor cannot guarantee since the initialization of the subclasses might not be finished.
After this function, the widget has a proper font and palette and QApplication::polish() has been called.
Remember to call QWidget's implementation first when reimplementing this function to ensure that your program does not end up in infinite recursion.
Reimplementado en QTextEdit, QwtCounter y QwtPlot.
virtual void QWidget::polish | ( | ) | [virtual, slot] |
Reimplementado en QTextEdit, QwtCounter y QwtPlot.
QPoint QWidget::pos | ( | ) | const |
QPoint QWidget::pos | ( | ) | const |
void QWidget::raise | ( | ) | [slot] |
Restores the widget after it has been maximized or minimized.
Calling this function has no effect for other than top-level widgets.
Raises this widget to the top of the parent widget's stack.
If there are any siblings of this widget that overlap it on the screen, this widget will be visually in front of its siblings afterwards.
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.
void QWidget::raise | ( | ) | [slot] |
void QWidget::recreate | ( | QWidget * | parent, |
WFlags | f, | ||
const QPoint & | p, | ||
bool | showIt = FALSE |
||
) | [inline] |
void QWidget::recreate | ( | QWidget * | parent, |
WFlags | f, | ||
const QPoint & | p, | ||
bool | showIt = FALSE |
||
) | [inline] |
This method is provided to aid porting from Qt 1.0 to 2.0. It has been renamed reparent() in Qt 2.0.
QRect QWidget::rect | ( | ) | const |
QRect QWidget::rect | ( | ) | const |
void QWidget::releaseKeyboard | ( | ) |
Releases the keyboard grab.
void QWidget::releaseKeyboard | ( | ) |
void QWidget::releaseMouse | ( | ) |
void QWidget::releaseMouse | ( | ) |
Releases the mouse grab.
void QWidget::repaint | ( | ) | [inline, slot] |
Esta es una función miembro sobrecargada que se suministra por conveniencia. Difiere de la anterior función solamente en los argumentos que acepta.
This version erases and repaints the entire widget.
Reimplementado en QSplashScreen y QSplashScreen.
void QWidget::repaint | ( | bool | erase | ) | [slot] |
Esta es una función miembro sobrecargada que se suministra por conveniencia. Difiere de la anterior función solamente en los argumentos que acepta.
This version repaints the entire widget.
Reimplementado en QtTableView.
Repaints the widget directly by calling paintEvent() directly, unless updates are disabled or the widget is hidden.
Erases the widget area (x,y,w,h) if erase is TRUE.
If w is negative, it is replaced with width() - x
. If h is negative, it is replaced width height() - y
.
Use repaint if your widget needs to be repainted immediately, for example when doing some animation. In all other cases, update() is to be preferred. Calling update() many times in a row will generate a single paint event.
Repaints the widget directly by calling paintEvent() immediately, unless updates are disabled or the widget is hidden.
If erase is TRUE, Qt erases the area (x, y, w, h) before the paintEvent() call.
If w is negative, it is replaced with {width() - x}, and if h is negative, it is replaced width
{height() - y}.
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.
Reimplementado en QtTableView.
Esta es una función miembro sobrecargada que se suministra por conveniencia. Difiere de la anterior función solamente en los argumentos que acepta.
Esta es una función miembro sobrecargada que se suministra por conveniencia. Difiere de la anterior función solamente en los argumentos que acepta.
Repaints the widget directly by calling paintEvent() directly, unless updates are disabled or the widget is hidden.
Erases the widget region r if erase is TRUE.
Reimplementado en QtTableView.
Repaints the widget directly by calling paintEvent() directly, unless updates are disabled or the widget is hidden.
Erases the widget region reg if erase is TRUE.
Use repaint if your widget needs to be repainted immediately, for example when doing some animation. In all other cases, update() is to be preferred. Calling update() many times in a row will generate a single paint event.
Esta es una función miembro sobrecargada que se suministra por conveniencia. Difiere de la anterior función solamente en los argumentos que acepta. Repaints the widget directly by calling paintEvent() directly, unless updates are disabled or the widget is hidden.
Erases the widget region reg if erase is TRUE.
Only use repaint if your widget needs to be repainted immediately, for example when doing some animation. In all other cases, use update(). Calling update() many times in a row will generate a single paint event.
Reimplementado en QtTableView.
void QWidget::repaint | ( | ) | [slot] |
Reimplementado en QSplashScreen y QSplashScreen.
void QWidget::repaint | ( | bool | erase | ) | [slot] |
Reimplementado en QtTableView.
Reimplementado en QtTableView.
void QWidget::reparent | ( | QWidget * | parent, |
WFlags | f, | ||
const QPoint & | p, | ||
bool | showIt = FALSE |
||
) | [virtual] |
Reparents the widget. The widget gets a new parent, new widget flags (f, but as usual, use 0) at a new position in its new parent (p).
If showIt is TRUE, show() is called once the widget has been reparented.
If the new parent widget is in a different top-level widget, 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, reparent() calls clearFocus() for that widget.
If the new parent widget is in the same top-level widget as the old parent, reparent doesn't change the tab order or keyboard focus.
Esta es una función miembro sobrecargada que se suministra por conveniencia. Difiere de la anterior función solamente en los argumentos que acepta. A convenience version of reparent that does not take widget flags as argument.
Calls reparent(parent, getWFlags() & ~ WType_Mask, p, showIt).
void QWidget::resetInputContext | ( | ) | [protected] |
This function is called when the user finishes input composition, e.g. changes focus to another widget, moves the cursor, etc.
void QWidget::resetInputContext | ( | ) | [protected] |
void QWidget::resize | ( | const QSize & | ) | [slot] |
Reimplementado en QDialog, QPushButton, QScrollView, QDialog, QPushButton y QScrollView.
void QWidget::resize | ( | const QSize & | s | ) | [inline, slot] |
Reimplementado en QDialog, QPushButton, QScrollView, QDialog, QPushButton y QScrollView.
Esta es una función miembro sobrecargada que se suministra por conveniencia. Difiere de la anterior función solamente en los argumentos que acepta. This corresponds to resize( QSize(w, h) ).
Reimplementado en QDialog, QPushButton, QScrollView, QDialog, QPushButton y QScrollView.
Reimplementado en QDialog, QPushButton, QScrollView, QDialog, QPushButton y QScrollView.
void QWidget::resizeEvent | ( | QResizeEvent * | ) | [protected, virtual] |
This event handler can be reimplemented in a subclass to receive widget resize events. 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.
Widgets that have been created with the WNoAutoErase
flag will not be erased. Nevertheless, they will receive a paint event for their entire area afterwards. Again, no drawing needs to be done inside this handler.
The default implementation calls updateMask() if the widget has automatic masking enabled.
Reimplementado en VDatePopup, VPopupFrame, FLImageViewer, MReportViewer, PaintWidget, QSEditor, MarkerWidget, ViewManager, QDialogButtons, QTitleBar, QCheckBox, QComboBox, QDataTable, QDateEdit, QTimeEdit, QDateTimeEdit, QDesktopWidget, QDial, QDialog, QDockWindow, QFileDialog, QFrame, QGLWidget, QGroupBox, QHeader, QIconView, QLabel, QLineEdit, QListBox, QListView, QMenuBar, QMessageBox, QProgressDialog, QPushButton, QRadioButton, QSpinWidget, QScrollBar, QScrollView, QSlider, QSpinBox, QSplitter, QStatusBar, QTabBar, QTabDialog, QTabWidget, QTextEdit, QToolBar, QWidgetStack, QWorkspace, QtMultiLineEdit, QtTableView, QDialog, QFileDialog, QMessageBox, QProgressDialog, QTabDialog, QIconView, QDesktopWidget, QGLWidget, QDataTable, QTableHeader, QCheckBox, QComboBox, QDateTimeEditor, QDateEdit, QTimeEdit, QDateTimeEdit, QDial, QDialogButtons, QDockWindowHandle, QDockWindowTitleBar, QDockWindow, QFrame, QGroupBox, QHeader, QLabel, QLineEdit, QListBox, QListView, QMenuBar, QPushButton, QRadioButton, QSpinWidget, QScrollBar, QScrollView, QSlider, QSpinBox, QSplitter, QStatusBar, QTabBar, QTabWidget, QTextEdit, QTitleBar, QToolBarExtensionWidget, QToolBar, QWidgetStack, QWorkspaceChild, QWorkspace, FormWindow, Spacer, MenuBarEditor, PropertyList, StyledButton, QDesignerWidgetStack, QDesignerWidget, MarkerWidget, ViewManager, ShadowWidget, EditorPage, MessageEditor, QwtDial, QwtKnob, QwtLegend, QwtPlot, QwtScaleWidget, QwtSlider, QwtThermo y QwtWheel.
virtual void QWidget::resizeEvent | ( | QResizeEvent * | ) | [protected, virtual] |
Reimplementado en VDatePopup, VPopupFrame, FLImageViewer, MReportViewer, PaintWidget, QSEditor, MarkerWidget, ViewManager, QDialogButtons, QTitleBar, QCheckBox, QComboBox, QDataTable, QDateEdit, QTimeEdit, QDateTimeEdit, QDesktopWidget, QDial, QDialog, QDockWindow, QFileDialog, QFrame, QGLWidget, QGroupBox, QHeader, QIconView, QLabel, QLineEdit, QListBox, QListView, QMenuBar, QMessageBox, QProgressDialog, QPushButton, QRadioButton, QSpinWidget, QScrollBar, QScrollView, QSlider, QSpinBox, QSplitter, QStatusBar, QTabBar, QTabDialog, QTabWidget, QTextEdit, QToolBar, QWidgetStack, QWorkspace, QtMultiLineEdit, QtTableView, QDialog, QFileDialog, QMessageBox, QProgressDialog, QTabDialog, QIconView, QDesktopWidget, QGLWidget, QDataTable, QTableHeader, QCheckBox, QComboBox, QDateTimeEditor, QDateEdit, QTimeEdit, QDateTimeEdit, QDial, QDialogButtons, QDockWindowHandle, QDockWindowTitleBar, QDockWindow, QFrame, QGroupBox, QHeader, QLabel, QLineEdit, QListBox, QListView, QMenuBar, QPushButton, QRadioButton, QSpinWidget, QScrollBar, QScrollView, QSlider, QSpinBox, QSplitter, QStatusBar, QTabBar, QTabWidget, QTextEdit, QTitleBar, QToolBarExtensionWidget, QToolBar, QWidgetStack, QWorkspaceChild, QWorkspace, FormWindow, Spacer, MenuBarEditor, PropertyList, StyledButton, QDesignerWidgetStack, QDesignerWidget, MarkerWidget, ViewManager, ShadowWidget, EditorPage, MessageEditor, QwtDial, QwtKnob, QwtLegend, QwtPlot, QwtScaleWidget, QwtSlider, QwtThermo y QwtWheel.
Esta es una función miembro sobrecargada que se suministra por conveniencia. Difiere de la anterior función solamente en los argumentos que acepta. This version of the function scrolls the entire widget and moves the widget's children along with the scroll.
Scrolls the widget including its children dx pixels to the right and dy downwards. Both dx and dy may be negative.
After scrolling, scroll() sends a paint event for the the part that is read but not written. For example, when scrolling 10 pixels rightwards, the leftmost ten pixels of the widget need repainting. The paint event may be delivered immediately or later, depending on some heuristics (note that you might have to force processing of paint events using QApplication::sendPostedEvents() when using scroll() and move() in combination).
Reimplementado en QtTableView.
Scrolls r dx pixels to the right and dy downwards. Both dx and dy may be negative.
If r is empty or invalid, the result is undefined.
After scrolling, scroll() sends a paint event for the the part of r that is read but not written. For example, when scrolling 10 pixels rightwards, the leftmost ten pixels of r need repainting. The paint event may be delivered immediately or later, depending on some heuristics.
This version of scroll() does not move the children of this widget.
Esta es una función miembro sobrecargada que se suministra por conveniencia. Difiere de la anterior función solamente en los argumentos que acepta. This version only scrolls r and does not move the children of the widget.
If r is empty or invalid, the result is undefined.
Reimplementado en QtTableView.
virtual void QWidget::setAcceptDrops | ( | bool | on | ) | [virtual] |
void QWidget::setAcceptDrops | ( | bool | on | ) | [virtual] |
Announces to the system that this widget may be able to accept drop events.
If the widgets is the desktop, this may fail if another application is using the desktop - you can call acceptDrops() to test if this occurs.
virtual void QWidget::setActiveWindow | ( | ) | [virtual] |
void QWidget::setActiveWindow | ( | ) | [virtual] |
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, call raise() in addition. Note that the window has be to visible, otherwise setActiveWindow() 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 flash the task bar entry blue to indicate that the window has done something. This is due to Microsoft not allowing an application to interrupt what the user is currently doing in another application.
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 setActiveWindow() 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 flash the task bar entry blue to indicate that the window has done something. This is because Microsoft do not allow an application to interrupt what the user is currently doing in another application.
virtual void QWidget::setAutoMask | ( | bool | ) | [virtual] |
void QWidget::setAutoMask | ( | bool | enable | ) | [virtual] |
virtual void QWidget::setBackgroundColor | ( | const QColor & | ) | [virtual] |
Reimplementado en QtTableView.
void QWidget::setBackgroundColor | ( | const QColor & | c | ) | [virtual] |
Use setPaletteBackgroundColor() or setEraseColor() instead.
Reimplementado en QtTableView.
void QWidget::setBackgroundMode | ( | BackgroundMode | , |
BackgroundMode | |||
) |
virtual void QWidget::setBackgroundMode | ( | BackgroundMode | ) | [virtual] |
void QWidget::setBackgroundMode | ( | BackgroundMode | m, |
BackgroundMode | visual | ||
) |
Esta es una función miembro sobrecargada que se suministra por conveniencia. Difiere de la anterior función solamente en los argumentos que acepta. Sets the widget's own background mode to m and the visual background mode to visual. The visual background mode is used with the designable properties backgroundColor
, foregroundColor
and backgroundPixmap
.
For complex controls, the logical background mode sometimes differs from a widget's own background mode. A spinbox for example has PaletteBackground
as background mode (typically dark gray), while it's embedded lineedit control uses PaletteBase
(typically white). Since the lineedit covers most of the visual area of a spinbox, it defines PaletteBase
to be its visual background mode. Changing the backgroundColor
property thus changes the lineedit control's background, which is exactly what the user expects in {Qt Designer}.
void QWidget::setBackgroundMode | ( | BackgroundMode | m | ) | [virtual] |
void QWidget::setBackgroundOrigin | ( | BackgroundOrigin | origin | ) | [virtual] |
virtual void QWidget::setBackgroundOrigin | ( | BackgroundOrigin | ) | [virtual] |
void QWidget::setBackgroundPixmap | ( | const QPixmap & | pm | ) | [virtual] |
Use setPaletteBackgroundPixmap() or setErasePixmap() instead.
virtual void QWidget::setBackgroundPixmap | ( | const QPixmap & | ) | [virtual] |
Sets the base size of the widget. The base size is important only in combination with size increments. See setSizeIncrement() for details.
Esta es una función miembro sobrecargada que se suministra por conveniencia. Difiere de la anterior función solamente en los argumentos que acepta. This corresponds to setBaseSize( QSize(basew, baseh) ). Sets the widgets base size to width basew and height baseh.
void QWidget::setBaseSize | ( | const QSize & | ) |
void QWidget::setBaseSize | ( | const QSize & | s | ) | [inline] |
Esta es una función miembro sobrecargada que se suministra por conveniencia. Difiere de la anterior función solamente en los argumentos que acepta.
void QWidget::setCaption | ( | const QString & | caption | ) | [virtual, slot] |
Sets the window caption (title) to caption.
Reimplementado en QTitleBar, QDockWindow, QDockWindow, QTitleBar y QWorkspaceChild.
virtual void QWidget::setCaption | ( | const QString & | ) | [virtual, slot] |
Reimplementado en QTitleBar, QDockWindow, QDockWindow, QTitleBar y QWorkspaceChild.
void QWidget::setCursor | ( | const QCursor & | cursor | ) | [virtual] |
Sets the widget cursor shape to cursor.
The mouse cursor will assume this shape when it's over this widget. See a list of predefined cursor objects with a range of useful shapes in the QCursor documentation.
An editor widget would for example use an I-beam cursor:
setCursor( ibeamCursor );
Reimplementado en QwtPanner.
void QWidget::setDisabled | ( | bool | ) | [slot] |
void QWidget::setDisabled | ( | bool | disable | ) | [slot] |
Disables widget input events if disable is TRUE; otherwise enables input events.
See the enabled documentation for more information.
virtual void QWidget::setEnabled | ( | bool | ) | [virtual, slot] |
Reimplementado en VDatePopup, QComboBox, QGroupBox, QScrollView, QSpinBox, QTable, QTextEdit, QTable, QComboBox, QGroupBox, QScrollView, QSpinBox, QTextEdit, SizeHandle y QwtPanner.
void QWidget::setEnabled | ( | bool | enable | ) | [virtual, slot] |
Reimplementado en VDatePopup, QComboBox, QGroupBox, QScrollView, QSpinBox, QTable, QTextEdit, QTable, QComboBox, QGroupBox, QScrollView, QSpinBox, QTextEdit, SizeHandle y QwtPanner.
void QWidget::setEraseColor | ( | const QColor & | color | ) | [virtual] |
Sets the erase color of the widget to color.
The erase color is the color the widget is to be cleared to before paintEvent() is called. If there is an erase pixmap (set using setErasePixmap()), then this property has an indeterminate value.
virtual void QWidget::setEraseColor | ( | const QColor & | ) | [virtual] |
void QWidget::setErasePixmap | ( | const QPixmap & | pixmap | ) | [virtual] |
Sets the widget's erase pixmap to pixmap.
This pixmap is used to clear the widget before paintEvent() is called.
Reimplementado en PaintWidget.
virtual void QWidget::setErasePixmap | ( | const QPixmap & | ) | [virtual] |
Reimplementado en PaintWidget.
void QWidget::setFixedHeight | ( | int | h | ) |
void QWidget::setFixedHeight | ( | int | h | ) |
Sets both the minimum and maximum heights of the widget to h without changing the widths. Provided for convenience.
void QWidget::setFixedSize | ( | const QSize & | ) |
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.
Esta es una función miembro sobrecargada que se suministra por conveniencia. Difiere de la anterior función solamente en los argumentos que acepta.
Sets the width of the widget to w and the height to h.
void QWidget::setFixedWidth | ( | int | w | ) |
void QWidget::setFixedWidth | ( | int | w | ) |
Sets both the minimum and maximum width of the widget to w without changing the heights. Provided for convenience.
virtual void QWidget::setFocus | ( | ) | [virtual, slot] |
Reimplementado en FLDataTable y SourceEditor.
void QWidget::setFocus | ( | ) | [virtual, slot] |
Gives the keyboard input focus to this widget (or its focus proxy) if this widget or one of its parents is the active window.
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.
Reimplementado en FLDataTable y SourceEditor.
virtual void QWidget::setFocusPolicy | ( | FocusPolicy | ) | [virtual] |
Reimplementado en QDesignerRadioButton.
void QWidget::setFocusPolicy | ( | FocusPolicy | policy | ) | [virtual] |
Reimplementado en QDesignerRadioButton.
void QWidget::setFocusProxy | ( | QWidget * | w | ) | [virtual] |
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, such as QComboBox, can "have focus", but create a child widget to actually handle the focus. QComboBox, for example, creates a QLineEdit which handles the focus.
setFocusProxy() sets the widget which will actually get focus when "this widget" gets it. If there is a focus proxy, focusPolicy(), setFocusPolicy(), setFocus() and hasFocus() all operate on the focus proxy.
virtual void QWidget::setFocusProxy | ( | QWidget * | ) | [virtual] |
Use setFont(const QFont& font) instead.
void QWidget::setFont | ( | const QFont & | font | ) | [virtual] |
Reimplementado en QComboBox, QIconView, QLabel, QLineEdit, QListBox, QListView, QPopupMenu, QTabDialog, QTextEdit, QWizard, QtMultiLineEdit, QTabDialog, QWizard, QIconView, QComboBox, QLabel, QLineEdit, QListBox, QListView, QPopupMenu y QTextEdit.
virtual void QWidget::setFont | ( | const QFont & | ) | [virtual] |
Reimplementado en QComboBox, QIconView, QLabel, QLineEdit, QListBox, QListView, QPopupMenu, QTabDialog, QTextEdit, QWizard, QtMultiLineEdit, QTabDialog, QWizard, QIconView, QComboBox, QLabel, QLineEdit, QListBox, QListView, QPopupMenu y QTextEdit.
Esta es una función miembro sobrecargada que se suministra por conveniencia. Difiere de la anterior función solamente en los argumentos que acepta. This corresponds to setGeometry( QRect(x, y, w, h) ).
Reimplementado en QDialog, QPushButton, QDialog y QPushButton.
Reimplementado en QDialog, QPushButton, QDialog y QPushButton.
void QWidget::setGeometry | ( | const QRect & | r | ) | [inline, virtual, slot] |
Reimplementado en QDialog, QPushButton, QDialog y QPushButton.
virtual void QWidget::setGeometry | ( | const QRect & | ) | [virtual, slot] |
Reimplementado en QDialog, QPushButton, QDialog y QPushButton.
void QWidget::setHidden | ( | bool | hide | ) | [slot] |
void QWidget::setHidden | ( | bool | hide | ) | [slot] |
void QWidget::setIcon | ( | const QPixmap & | pixmap | ) | [virtual, slot] |
Sets the window icon to pixmap.
Reimplementado en QTitleBar, QMessageBox, QMessageBox y QTitleBar.
virtual void QWidget::setIcon | ( | const QPixmap & | ) | [virtual, slot] |
Reimplementado en QTitleBar, QMessageBox, QMessageBox y QTitleBar.
void QWidget::setIconText | ( | const QString & | iconText | ) | [virtual, slot] |
Sets the text of the window's icon to iconText.
virtual void QWidget::setIconText | ( | const QString & | ) | [virtual, slot] |
void QWidget::setInputMethodEnabled | ( | bool | b | ) |
void QWidget::setInputMethodEnabled | ( | bool | b | ) |
virtual void QWidget::setKeyCompression | ( | bool | ) | [protected, virtual] |
void QWidget::setKeyCompression | ( | bool | compress | ) | [protected, virtual] |
Enables key event compression, if compress is TRUE, and disables it if compress is FALSE.
Key compression is off by default (except for QLineEdit and QTextEdit), so widgets receive one key press event for each key press (or more, since autorepeat is usually on). If you turn it on and your program doesn't keep up with key input, Qt may try to compress key events so that more than one character can be processed in each event.
For example, a word processor widget might receive 2, 3 or more characters in each QKeyEvent::text(), if the layout recalculation takes too long for the CPU.
If a widget supports multiple character unicode input, it is always safe to turn the compression on.
Qt performs key event compression only for printable characters. Modifier keys, cursor movement keys, function keys and miscellaneous action keys (e.g. Escape, Enter, Backspace, PrintScreen) will stop key event compression, even if there are more compressible key events available.
Not all platforms support this compression, in which case turning it on will have no effect.
virtual void QWidget::setMask | ( | const QRegion & | ) | [virtual] |
virtual void QWidget::setMask | ( | const QBitmap & | ) | [virtual] |
void QWidget::setMask | ( | const QRegion & | region | ) | [virtual] |
Causes only the parts of the widget which overlap region 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.
Esta es una función miembro sobrecargada que se suministra por conveniencia. Difiere de la anterior función solamente en los argumentos que acepta. Causes only the parts of the widget which overlap region 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.
void QWidget::setMask | ( | const QBitmap & | bitmap | ) | [virtual] |
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.
Causes only the pixels of the widget for which bitmap has a corresponding 1 bit to be visible. Use Qt::color0 to draw transparent regions and Qt::color1 to draw opaque regions of the bitmap.
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.
See examples/tux
for an example of masking for transparency.
void QWidget::setMaximumHeight | ( | int | maxh | ) |
void QWidget::setMaximumHeight | ( | int | maxh | ) |
void QWidget::setMaximumSize | ( | const QSize & | s | ) | [inline] |
Esta es una función miembro sobrecargada que se suministra por conveniencia. Difiere de la anterior función solamente en los argumentos que acepta.
Sets the maximum size of the widget to w by h pixels.
The widget cannot be resized to a larger size than the maximum widget size. The widget's size is forced to the maximum size if the current size is greater.
Esta es una función miembro sobrecargada que se suministra por conveniencia. Difiere de la anterior función solamente en los argumentos que acepta. This function corresponds to setMaximumSize( QSize(maxw, maxh) ). Sets the maximum width to maxw and the maximum height to maxh.
void QWidget::setMaximumSize | ( | const QSize & | ) |
void QWidget::setMaximumWidth | ( | int | maxw | ) |
void QWidget::setMaximumWidth | ( | int | maxw | ) |
void QWidget::setMicroFocusHint | ( | int | x, |
int | y, | ||
int | width, | ||
int | height, | ||
bool | text = TRUE , |
||
QFont * | f = 0 |
||
) | [protected, virtual] |
When a widget gets focus, it should call setMicroFocusHint for some appropriate position and size - x, y and w by h. This has no visual effect, it just provides hints to any system-specific input handling tools.
The text argument should be TRUE if this is a position for text input.
In the Windows version of Qt, this method sets the system caret, which is used for user Accessibility focus handling. If text is TRUE, it also sets the IME composition window in Far East Asian language input systems.
In the X11 version of Qt, if text is TRUE, this method sets the XIM "spot" point for complex language input handling.
When a widget gets focus, it should call setMicroFocusHint() with some appropriate position and size, x, y, width and height. This has no visual effect, it just provides hints to any system-specific input handling tools.
The text argument should be TRUE if this is a position for text input.
In the Windows version of Qt, this method sets the system caret, which is used for user Accessibility focus handling. If text is TRUE, it also sets the IME composition window in Far East Asian language input systems.
In the X11 version of Qt, if text is TRUE, this method sets the XIM "spot" point for complex language input handling.
The font f is a rendering hint to the currently active input method. If f is 0 the widget's font is used.
virtual void QWidget::setMicroFocusHint | ( | int | x, |
int | y, | ||
int | w, | ||
int | h, | ||
bool | text = TRUE , |
||
QFont * | f = 0 |
||
) | [protected, virtual] |
void QWidget::setMinimumHeight | ( | int | minh | ) |
void QWidget::setMinimumHeight | ( | int | minh | ) |
Sets the minimum size of the widget to w by h pixels.
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.
If you use a layout inside the widget, the minimum size will be set by the layout and not by setMinimumSize, unless you set the layouts resize mode to QLayout::FreeResize.
Esta es una función miembro sobrecargada que se suministra por conveniencia. Difiere de la anterior función solamente en los argumentos que acepta. This function corresponds to setMinimumSize( QSize(minw, minh) ). Sets the minimum width to minw and the minimum height to minh.
void QWidget::setMinimumSize | ( | const QSize & | ) |
void QWidget::setMinimumSize | ( | const QSize & | s | ) | [inline] |
Esta es una función miembro sobrecargada que se suministra por conveniencia. Difiere de la anterior función solamente en los argumentos que acepta.
void QWidget::setMinimumWidth | ( | int | minw | ) |
void QWidget::setMinimumWidth | ( | int | minw | ) |
void QWidget::setMouseTracking | ( | bool | enable | ) | [virtual, slot] |
virtual void QWidget::setMouseTracking | ( | bool | enable | ) | [virtual, slot] |
void QWidget::setName | ( | const char * | name | ) | [virtual] |
Sets the object's name to name.
Reimplementado de QObject.
void QWidget::setName | ( | const char * | name | ) | [virtual] |
Reimplementado de QObject.
void QWidget::setPalette | ( | const QPalette & | palette | ) | [virtual] |
Reimplementado en QComboBox, QIconView, QLineEdit, QListView, QScrollBar, QSlider, QTextEdit, QtTableView, QIconView, QComboBox, QLineEdit, QListView, QScrollBar, QSlider y QTextEdit.
virtual void QWidget::setPalette | ( | const QPalette & | ) | [virtual] |
Reimplementado en QComboBox, QIconView, QLineEdit, QListView, QScrollBar, QSlider, QTextEdit, QtTableView, QIconView, QComboBox, QLineEdit, QListView, QScrollBar, QSlider y QTextEdit.
Use setPalette( const QPalette& p ) instead.
void QWidget::setPaletteBackgroundColor | ( | const QColor & | color | ) | [virtual] |
Reimplementado en PaintWidget, QWorkspace y QWorkspace.
virtual void QWidget::setPaletteBackgroundColor | ( | const QColor & | ) | [virtual] |
Reimplementado en PaintWidget, QWorkspace y QWorkspace.
virtual void QWidget::setPaletteBackgroundPixmap | ( | const QPixmap & | ) | [virtual] |
Reimplementado en QWorkspace y QWorkspace.
void QWidget::setPaletteBackgroundPixmap | ( | const QPixmap & | pixmap | ) | [virtual] |
Reimplementado en QWorkspace y QWorkspace.
void QWidget::setPaletteForegroundColor | ( | const QColor & | color | ) |
void QWidget::setPaletteForegroundColor | ( | const QColor & | ) |
void QWidget::setShown | ( | bool | show | ) | [slot] |
void QWidget::setShown | ( | bool | show | ) | [slot] |
Sets the size increment of the widget. When the user resizes the window, the size will move in steps of w pixels horizontally and h pixels vertically, with baseSize() as basis. Preferred widget sizes are therefore for non-negative integers i and j:
width = baseSize().width() + i * sizeIncrement().width(); height = baseSize().height() + j * sizeIncrement().height();
Note that while you can set the size increment for all widgets, it has no effect except for top-level widgets.
Esta es una función miembro sobrecargada que se suministra por conveniencia. Difiere de la anterior función solamente en los argumentos que acepta. Sets the x (width) size increment to w and the y (height) size increment to h.
void QWidget::setSizeIncrement | ( | const QSize & | ) |
void QWidget::setSizeIncrement | ( | const QSize & | s | ) | [inline] |
Esta es una función miembro sobrecargada que se suministra por conveniencia. Difiere de la anterior función solamente en los argumentos que acepta.
void QWidget::setSizePolicy | ( | QSizePolicy::SizeType | hor, |
QSizePolicy::SizeType | ver, | ||
bool | hfw = FALSE |
||
) |
Reimplementado en QScrollBar, QSlider, QScrollBar y QSlider.
void QWidget::setSizePolicy | ( | QSizePolicy::SizeType | hor, |
QSizePolicy::SizeType | ver, | ||
bool | hfw = FALSE |
||
) | [inline] |
Esta es una función miembro sobrecargada que se suministra por conveniencia. Difiere de la anterior función solamente en los argumentos que acepta.
Sets the size policy of the widget to hor, ver and hfw (height for width).
Reimplementado en QScrollBar, QSlider, QScrollBar y QSlider.
void QWidget::setSizePolicy | ( | QSizePolicy | policy | ) | [virtual] |
Reimplementado en QScrollBar, QSlider, QScrollBar y QSlider.
virtual void QWidget::setSizePolicy | ( | QSizePolicy | ) | [virtual] |
Reimplementado en QScrollBar, QSlider, QScrollBar y QSlider.
void QWidget::setStyle | ( | QStyle * | ) |
Esta es una función miembro sobrecargada que se suministra por conveniencia. Difiere de la anterior función solamente en los argumentos que acepta. Sets the widget's GUI style to style using the QStyleFactory.
void QWidget::setStyle | ( | QStyle * | style | ) |
Sets the widget's GUI style to style. 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.
Moves the second widget around the ring of focus widgets so that keyboard focus moves from the first widget to the second widget when the Tab key is pressed.
Note that since the tab order of the second widget is changed, you should order a chain like this:
setTabOrder( a, b ); // a to b setTabOrder( b, c ); // a to b to c setTabOrder( c, d ); // a to b to c to d
not like this:
setTabOrder( c, d ); // c to d WRONG setTabOrder( a, b ); // a to b AND c to d setTabOrder( b, c ); // a to b to c, but not c to d
If first or second has a focus proxy, setTabOrder() correctly substitutes the proxy.
virtual void QWidget::setUpdatesEnabled | ( | bool | enable | ) | [virtual, slot] |
void QWidget::setWFlags | ( | WFlags | f | ) | [inline, protected, virtual] |
Sets the widget flags f.
Widget flags are a combination of {Qt::WidgetFlags}.
Reimplementado en QETWidget, QETWidget y QWFlagWidget.
virtual void QWidget::setWFlags | ( | WFlags | ) | [protected, virtual] |
Reimplementado en QETWidget, QETWidget y QWFlagWidget.
void QWidget::setWindowOpacity | ( | double | level | ) |
void QWidget::setWindowOpacity | ( | double | level | ) |
void QWidget::setWindowState | ( | uint | windowState | ) |
void QWidget::setWindowState | ( | uint | windowState | ) |
Sets the window state to windowState. The window state is a OR'ed combination of Qt::WindowState: WindowMinimized
, WindowMaximized
, WindowFullScreen
and 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 mormal mode, use the following code:
w->setWindowState(w->windowState() ^ WindowFullScreen);
In order to restore and activate a minimized window (while preserving its maximized and/or full-screen state), use the following:
w->setWindowState(w->windowState() & ~WindowMinimized | WindowActive);
Note: On some window systems WindowActive
is not immediate, and may be ignored in certain cases.
virtual void QWidget::setWState | ( | uint | ) | [protected, virtual] |
Reimplementado en QETWidget, QETWidget y QWFlagWidget.
void QWidget::setWState | ( | uint | f | ) | [inline, protected, virtual] |
Reimplementado en QETWidget, QETWidget y QWFlagWidget.
virtual void QWidget::show | ( | ) | [virtual, slot] |
Reimplementado en QDialog, QListView, QMainWindow, QMenuBar, QPopupMenu, QProgressBar, QScrollView, QTabBar, QTabDialog, QToolBar, QWidgetStack, QWizard, QtTableView, QDialog, QTabDialog, QWizard, QListView, QMainWindow, QMenuBar, QPopupMenu, QProgressBar, QScrollView, QTabBar, QToolBar, QWidgetStack, MenuBarEditor y PopupMenuEditor.
void QWidget::show | ( | ) | [virtual, slot] |
Shows the widget and its child widgets.
If its size or position has changed, Qt guarantees that a widget gets move and resize events just before it is shown.
You almost never have to reimplement this 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 polish().
Reimplementado en QDialog, QListView, QMainWindow, QMenuBar, QPopupMenu, QProgressBar, QScrollView, QTabBar, QTabDialog, QToolBar, QWidgetStack, QWizard, QtTableView, QDialog, QTabDialog, QWizard, QListView, QMainWindow, QMenuBar, QPopupMenu, QProgressBar, QScrollView, QTabBar, QToolBar, QWidgetStack, MenuBarEditor y PopupMenuEditor.
virtual void QWidget::showEvent | ( | QShowEvent * | ) | [protected, virtual] |
Reimplementado en FLFormDB, QDialogButtons, QDockWindow, QHeader, QIconView, QListBox, QListView, QMessageBox, QProgressDialog, QTable, QTabWidget, QToolBox, QWorkspace, QMessageBox, QProgressDialog, QIconView, QTable, QDialogButtons, QDockWindow, QHeader, QListBox, QListView, QTabWidget, QToolBox, QWorkspace, QDesignerWidgetStack y QDesignerLabel.
void QWidget::showEvent | ( | QShowEvent * | ) | [protected, virtual] |
This event handler can be reimplemented in a subclass to receive widget show events.
Non-spontaneous show events are sent to widgets immediately before they are shown. The spontaneous show events of top-level widgets are delivered afterwards.
Reimplementado en FLFormDB, QDialogButtons, QDockWindow, QHeader, QIconView, QListBox, QListView, QMessageBox, QProgressDialog, QTable, QTabWidget, QToolBox, QWorkspace, QMessageBox, QProgressDialog, QIconView, QTable, QDialogButtons, QDockWindow, QHeader, QListBox, QListView, QTabWidget, QToolBox, QWorkspace, QDesignerWidgetStack y QDesignerLabel.
void QWidget::showFullScreen | ( | ) | [slot] |
void QWidget::showFullScreen | ( | ) | [slot] |
Shows the widget in full-screen mode.
Calling this function only affects top-level widgets.
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 WX11BypassWM 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.
void QWidget::showMaximized | ( | ) | [virtual, slot] |
Shows the widget maximized.
Calling this function only affects top-level widgets.
On X11, this function may not work properly with certain window managers. See the Window Geometry documentation for an explanation.
Reimplementado en QWorkspaceChild.
virtual void QWidget::showMaximized | ( | ) | [virtual, slot] |
Reimplementado en QWorkspaceChild.
void QWidget::showMinimized | ( | ) | [virtual, slot] |
Shows the widget minimized, as an icon.
Calling this function only affects top-level widgets.
Reimplementado en QWorkspaceChild.
virtual void QWidget::showMinimized | ( | ) | [virtual, slot] |
Reimplementado en QWorkspaceChild.
virtual void QWidget::showNormal | ( | ) | [virtual, slot] |
Reimplementado en QWorkspaceChild.
void QWidget::showNormal | ( | ) | [virtual, slot] |
Restores the widget after it has been maximized or minimized.
Calling this function only affects top-level widgets.
Reimplementado en QWorkspaceChild.
QSize QWidget::size | ( | ) | const |
QSize QWidget::size | ( | ) | const |
virtual QSize QWidget::sizeHint | ( | ) | const [virtual] |
Reimplementado en VDatePopup, VDateInternalMonthPicker, VDateTable, MPageDisplay, MReportViewer, QSEditor, QSDialogPrivate, QDialogButtons, QTitleBar, QCanvasView, QCheckBox, QComboBox, QDateEdit, QTimeEdit, QDateTimeEdit, QDial, QDialog, QDockWindow, QFrame, QGrid, QGroupBox, QHBox, QHeader, QIconView, QLabel, QLCDNumber, QLineEdit, QListBox, QListView, QMainWindow, QMenuBar, QPopupMenu, QProgressBar, QProgressDialog, QPushButton, QRadioButton, QScrollBar, QScrollView, QSizeGrip, QSlider, QSpinBox, QSplitter, QTabBar, QTable, QTabWidget, QTextEdit, QToolButton, QWidgetStack, QWorkspace, QtMultiLineEdit, QCanvasView, QWellArray, QColorPicker, QColNumLineEdit, QDialog, QErrorMessageTextView, QProgressDialog, QIconView, QSizeGrip, QTable, QCheckBox, QComboBox, QDateEdit, QTimeEdit, QDateTimeEdit, QDial, QDialogButtons, QDockWindowResizeHandle, QDockWindowHandle, QDockWindow, QFrame, QGrid, QGroupBox, QHBox, QHeader, QLabel, QLCDNumber, QLineEdit, QListBox, QListView, QMainWindow, QMenuBar, QPopupMenu, QProgressBar, QPushButton, QRadioButton, QScrollBar, QScrollView, QSlider, QSpinBox, QSplitterHandle, QSplitter, QTabBar, QTabWidget, QTextEdit, QTitleBar, QToolBarSeparator, QToolBoxButton, QToolButton, QWidgetStack, QWorkspaceChild, QWorkspace, QDesignerToolBarSeparator, Spacer, MenuBarEditor, StyledButton, CustomWidget, PhraseLV, QwtArrowButton, QwtCounter, QwtDial, QwtKnob, QwtLegend, QwtLegendItem, QwtPlot, QwtScaleWidget, QwtSlider, QwtTextLabel, QwtThermo y QwtWheel.
virtual QSize QWidget::sizeHint | ( | ) | const [virtual] |
Reimplementado en VDatePopup, VDateInternalMonthPicker, VDateTable, MPageDisplay, MReportViewer, QSEditor, QSDialogPrivate, QDialogButtons, QTitleBar, QCanvasView, QCheckBox, QComboBox, QDateEdit, QTimeEdit, QDateTimeEdit, QDial, QDialog, QDockWindow, QFrame, QGrid, QGroupBox, QHBox, QHeader, QIconView, QLabel, QLCDNumber, QLineEdit, QListBox, QListView, QMainWindow, QMenuBar, QPopupMenu, QProgressBar, QProgressDialog, QPushButton, QRadioButton, QScrollBar, QScrollView, QSizeGrip, QSlider, QSpinBox, QSplitter, QTabBar, QTable, QTabWidget, QTextEdit, QToolButton, QWidgetStack, QWorkspace, QtMultiLineEdit, QCanvasView, QWellArray, QColorPicker, QColNumLineEdit, QDialog, QErrorMessageTextView, QProgressDialog, QIconView, QSizeGrip, QTable, QCheckBox, QComboBox, QDateEdit, QTimeEdit, QDateTimeEdit, QDial, QDialogButtons, QDockWindowResizeHandle, QDockWindowHandle, QDockWindow, QFrame, QGrid, QGroupBox, QHBox, QHeader, QLabel, QLCDNumber, QLineEdit, QListBox, QListView, QMainWindow, QMenuBar, QPopupMenu, QProgressBar, QPushButton, QRadioButton, QScrollBar, QScrollView, QSlider, QSpinBox, QSplitterHandle, QSplitter, QTabBar, QTabWidget, QTextEdit, QTitleBar, QToolBarSeparator, QToolBoxButton, QToolButton, QWidgetStack, QWorkspaceChild, QWorkspace, QDesignerToolBarSeparator, Spacer, MenuBarEditor, StyledButton, CustomWidget, PhraseLV, QwtArrowButton, QwtCounter, QwtDial, QwtKnob, QwtLegend, QwtLegendItem, QwtPlot, QwtScaleWidget, QwtSlider, QwtTextLabel, QwtThermo y QwtWheel.
QSize QWidget::sizeIncrement | ( | ) | const |
QSize QWidget::sizeIncrement | ( | ) | const |
virtual QSizePolicy QWidget::sizePolicy | ( | ) | const [virtual] |
Reimplementado en MPageDisplay, QSlider, QtMultiLineEdit, QDockWindowHandle, QSlider y QLayoutWidget.
virtual QSizePolicy QWidget::sizePolicy | ( | ) | const [virtual] |
Reimplementado en MPageDisplay, QSlider, QtMultiLineEdit, QDockWindowHandle, QSlider y QLayoutWidget.
void QWidget::stackUnder | ( | QWidget * | w | ) | [slot] |
void QWidget::stackUnder | ( | QWidget * | ) | [slot] |
QStyle& QWidget::style | ( | ) | const |
QStyle & QWidget::style | ( | ) | const |
Returns the GUI style for this widget
void QWidget::styleChange | ( | QStyle & | ) | [protected, virtual] |
This virtual function is called when the style of the widgets changes. oldStyle is the previous GUI style; you can get the new style from style().
Reimplement this function if your widget needs to know when its GUI style changes. You will almost certainly need to update the widget using update().
The default implementation updates the widget including its geometry.
Reimplementado en QComboBox, QFrame, QIconView, QListView, QMainWindow, QMenuBar, QPopupMenu, QProgressBar, QProgressDialog, QSpinWidget, QScrollBar, QScrollView, QSlider, QSpinBox, QSplitter, QTabBar, QTabDialog, QTabWidget, QToolBar, QToolBox, QWorkspace, QProgressDialog, QTabDialog, QIconView, QComboBox, QDockWindowHandle, QFrame, QListView, QMainWindow, QMenuBar, QPopupMenu, QProgressBar, QSpinWidget, QScrollBar, QScrollView, QSlider, QSpinBox, QSplitter, QTabBar, QTabWidget, QToolBarSeparator, QToolBar, QToolBox, QWorkspaceChild, QWorkspace y QDesignerToolBarSeparator.
virtual void QWidget::styleChange | ( | QStyle & | ) | [protected, virtual] |
Reimplementado en QComboBox, QFrame, QIconView, QListView, QMainWindow, QMenuBar, QPopupMenu, QProgressBar, QProgressDialog, QSpinWidget, QScrollBar, QScrollView, QSlider, QSpinBox, QSplitter, QTabBar, QTabDialog, QTabWidget, QToolBar, QToolBox, QWorkspace, QProgressDialog, QTabDialog, QIconView, QComboBox, QDockWindowHandle, QFrame, QListView, QMainWindow, QMenuBar, QPopupMenu, QProgressBar, QSpinWidget, QScrollBar, QScrollView, QSlider, QSpinBox, QSplitter, QTabBar, QTabWidget, QToolBarSeparator, QToolBar, QToolBox, QWorkspaceChild, QWorkspace y QDesignerToolBarSeparator.
void QWidget::tabletEvent | ( | QTabletEvent * | e | ) | [protected, virtual] |
This event handler, for event e, 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.
virtual void QWidget::tabletEvent | ( | QTabletEvent * | ) | [protected, virtual] |
Qt::WFlags QWidget::testWFlags | ( | WFlags | f | ) | const [inline] |
Returns the bitwise AND of the widget flags and f.
Widget flags are a combination of {Qt::WidgetFlags}.
If you want to test for the presence of multiple flags (or composite flags such as WStyle_Splash
), test the return value for equality against the argument. For example:
int flags = WStyle_Tool | WStyle_NoBorder; if ( testWFlags(flags) ) ... // WStyle_Tool or WStyle_NoBorder or both are set if ( testWFlags(flags) == flags ) ... // both WStyle_Tool and WStyle_NoBorder are set
Qt::WState QWidget::testWState | ( | WState | s | ) | const [inline] |
QTLWExtra* QWidget::topData | ( | ) | [protected] |
Reimplementado en QExtraWidget.
QTLWExtra * QWidget::topData | ( | ) | [protected] |
Reimplementado en QExtraWidget.
QWidget* QWidget::topLevelWidget | ( | ) | const |
QWidget * QWidget::topLevelWidget | ( | ) | const |
Returns the top-level widget for this widget, i.e. the next ancestor widget that has (or could have) a window-system frame.
If the widget is a top-level, the widget itself is returned.
Typical usage is changing the window caption:
aWidget->topLevelWidget()->setCaption( "New Caption" );
void QWidget::unsetCursor | ( | ) | [virtual] |
Unset the cursor for this widget. The widget will use the cursor of its parent from now on.
This functions does nothing for top-level windows.
virtual void QWidget::unsetCursor | ( | ) | [virtual] |
void QWidget::unsetFont | ( | ) |
void QWidget::unsetFont | ( | ) |
void QWidget::unsetPalette | ( | ) |
void QWidget::unsetPalette | ( | ) |
void QWidget::update | ( | const QRect & | ) | [slot] |
void QWidget::update | ( | ) | [slot] |
Reimplementado en QDataBrowser, QDataBrowser y Workspace.
void QWidget::update | ( | ) | [slot] |
Updates the widget unless updates are disabled or the widget is hidden.
Updating the widget will erase the widget contents and generate an appropriate paint event for the invalidated region. The paint event is processed after the program has returned to the main event loop. Calling update() many times in a row will generate a single paint event.
If the widgets sets the WRepaintNoErase flag, update() will not erase its contents.
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 WRepaintNoErase
widget flag is set, the widget is responsible for painting all its pixels itself.
Reimplementado en QDataBrowser, QDataBrowser y Workspace.
Updates a rectangle (x, y, w, h) inside the widget unless updates are disabled or the widget is hidden.
Updating the widget erases the widget area (x,y,w,h) and generate an appropriate paint event for the invalidated region. The paint event is processed after the program has returned to the main event loop. Calling update() many times in a row will generate a single paint event.
If w is negative, it is replaced with width() - x
. If h is negative, it is replaced width height() - y
.
If the widgets sets the WRepaintNoErase flag, update() will not erase its contents.
Esta es una función miembro sobrecargada que se suministra por conveniencia. Difiere de la anterior función solamente en los argumentos que acepta. Updates a rectangle (x, y, w, h) inside 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 and a call to repaint() does.
Calling update() several times normally results in just one paintEvent() call.
If w is negative, it is replaced with {width() - x}. If h is negative, it is replaced width
{height() - y}.
Qt normally erases the specified area before the paintEvent() call. If the WRepaintNoErase
widget flag is set, the widget is responsible for painting all its pixels itself.
void QWidget::update | ( | const QRect & | r | ) | [inline, slot] |
Esta es una función miembro sobrecargada que se suministra por conveniencia. Difiere de la anterior función solamente en los argumentos que acepta.
Esta es una función miembro sobrecargada que se suministra por conveniencia. Difiere de la anterior función solamente en los argumentos que acepta.
Updates a rectangle r inside 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 and a call to repaint() does.
Calling update() several times normally results in just one paintEvent() call.
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.
void QWidget::updateGeometry | ( | ) |
void QWidget::updateMask | ( | ) | [protected, virtual] |
This function can be reimplemented in a subclass to support transparent widgets. It should be called whenever a widget changes state in a way that means that the shape mask must be recalculated.
Reimplementado en QCheckBox, QComboBox, QPushButton, QRadioButton, QTabWidget, QCheckBox, QComboBox, QPushButton, QRadioButton, QTabWidget, Spacer, OrderIndicator, QwtDial y QwtPicker::PickerWidget.
virtual void QWidget::updateMask | ( | ) | [protected, virtual] |
Reimplementado en QCheckBox, QComboBox, QPushButton, QRadioButton, QTabWidget, QCheckBox, QComboBox, QPushButton, QRadioButton, QTabWidget, Spacer, OrderIndicator, QwtDial y QwtPicker::PickerWidget.
QRect QWidget::visibleRect | ( | ) | const |
QRect QWidget::visibleRect | ( | ) | const |
void QWidget::wheelEvent | ( | QWheelEvent * | e | ) | [protected, virtual] |
This event handler, for event e, 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.
Reimplementado en QComboBox, QDial, QSpinWidget, QScrollBar, QScrollView, QSlider, QSpinBox, QWorkspace, QtMultiLineEdit, QComboBox, QDateTimeSpinWidget, QDial, QSpinWidget, QScrollBar, QScrollView, QSlider, QSpinBox, QWorkspace, QwtAbstractSlider y QwtCounter.
virtual void QWidget::wheelEvent | ( | QWheelEvent * | ) | [protected, virtual] |
Reimplementado en QComboBox, QDial, QSpinWidget, QScrollBar, QScrollView, QSlider, QSpinBox, QWorkspace, QtMultiLineEdit, QComboBox, QDateTimeSpinWidget, QDial, QSpinWidget, QScrollBar, QScrollView, QSlider, QSpinBox, QWorkspace, QwtAbstractSlider y QwtCounter.
int QWidget::width | ( | ) | const |
int QWidget::width | ( | ) | const |
void QWidget::windowActivationChange | ( | bool | oldActive | ) | [protected, virtual] |
This virtual function is called for a widget when its window is activated or deactivated by the window system. oldActive is the previous state; you can get the new setting from isActiveWindow().
Reimplement this function if your widget needs to know when its window becomes activated or deactivated.
The default implementation updates the visible part of the widget if the inactive and the active colorgroup are different for colors other than the highlight and link colors.
Reimplementado en QIconView, QLineEdit, QListBox, QListView, QSpinWidget, QTable, QTextEdit, QIconView, QTable, QLineEdit, QListBox, QListView, QSpinWidget y QTextEdit.
virtual void QWidget::windowActivationChange | ( | bool | oldActive | ) | [protected, virtual] |
double QWidget::windowOpacity | ( | ) | const |
double QWidget::windowOpacity | ( | ) | const |
uint QWidget::windowState | ( | ) | const |
Returns the current window state. The window state is a OR'ed combination of Qt::WindowState: WindowMinimized
, WindowMaximized
, WindowFullScreen
and WindowActive
.
uint QWidget::windowState | ( | ) | const |
WId QWidget::winId | ( | ) | const [inline] |
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.
WId QWidget::winId | ( | ) | const |
QWidgetMapper * QWidget::wmapper | ( | ) | [inline, static] |
static QWidgetMapper* QWidget::wmapper | ( | ) | [static] |
int QWidget::x | ( | ) | const |
int QWidget::x | ( | ) | const |
int QWidget::y | ( | ) | const |
int QWidget::y | ( | ) | const |
QApplication [friend] |
Reimplementado de QObject.
Reimplementado en QDesktopWidget.
QBaseApplication [friend] |
Reimplementado de QObject.
QETWidget [friend] |
QFontInfo [friend] |
QFontMetrics [friend] |
QLayout [friend] |
QPainter [friend] |
Reimplementado de QPaintDevice.
bool QWidget::acceptDrops [read, write] |
whether drop events are enabled for this widget
Returns TRUE if 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 (QWidget::isDesktop()), this may fail if another application is using the desktop; you can call acceptDrops() to test if this occurs.
bool QWidget::autoMask [read, write] |
whether the auto mask feature is enabled for the widget
Transparent widgets use a mask to define their visible region. QWidget has some built-in support to make the task of recalculating the mask easier. When setting auto mask to TRUE, updateMask() will be called whenever the widget is resized or changes its focus state. Note that you must reimplement updateMask() (which should include a call to setMask()) or nothing will happen.
Note: when you re-implement resizeEvent(), focusInEvent() or focusOutEvent() in your custom widgets and still want to ensure that the auto mask calculation works, you should add:
if ( autoMask() ) updateMask();
at the end of your event handlers. This is true for all member functions that change the appearance of the widget in a way that requires a recalculation of the mask.
While being a technically appealing concept, masks have a big drawback: when using complex masks that cannot be expressed easily with relatively simple regions, they can be very slow on some window systems. The classic example is a transparent label. The complex shape of its contents makes it necessary to represent its mask by a bitmap, which consumes both memory and time. If all you want is to blend the background of several neighboring widgets together seamlessly, you will probably want to use setBackgroundOrigin() rather than a mask.
QBrush QWidget::backgroundBrush [read] |
the widget's background brush
The background brush depends on a widget's palette and its background mode.
BackgroundMode QWidget::backgroundMode [read, write] |
the color role used for painting the background of the widget
setPaletteBackgroundColor() reads this property to determine which entry of the palette to set.
For most widgets the default suffices (PaletteBackground
, typically gray), but some need to use PaletteBase
(the background color for text output, typically white) or another role.
QListBox, which is "sunken" and uses the base color to contrast with its environment, does this in its constructor:
You will never need to set the background mode of a built-in widget in Qt, but you might consider setting it in your custom widgets, so that setPaletteBackgroundColor() works as expected.
Note that two of the BackgroundMode values make no sense for setBackgroundMode(), namely FixedPixmap
and FixedColor
. You must call setBackgroundPixmap() and setPaletteBackgroundColor() instead.
BackgroundOrigin QWidget::backgroundOrigin [read, write] |
the origin of the widget's background
The origin is either WidgetOrigin (the default), ParentOrigin, WindowOrigin or AncestorOrigin.
This only makes a difference if the widget has a background pixmap, in which case positioning matters. Using WindowOrigin
for several neighboring widgets makes the background blend together seamlessly. AncestorOrigin
allows blending backgrounds seamlessly when an ancestor of the widget has an origin other than WindowOrigin
.
QSize QWidget::baseSize [read, write] |
the base size of the widget
The base size is used to calculate a proper widget size if the widget defines sizeIncrement().
QString QWidget::caption [read, write] |
the window caption (title)
This property only makes sense for top-level widgets. If no caption has been set, the caption is QString::null.
Reimplementado en QDockWindowHandle.
QRect QWidget::childrenRect [read] |
the bounding rectangle of the widget's children
Hidden children are excluded.
QRegion QWidget::childrenRegion [read] |
the combined region occupied by the widget's children
Hidden children are excluded.
QColorGroup QWidget::colorGroup [read] |
the current color group of the widget palette
The color group is determined by the state of the widget. A disabled widget has the QPalette::disabled() color group, a widget with keyboard focus has the QPalette::active() color group, and an inactive widget has the QPalette::inactive() color group.
QCursor QWidget::cursor [read, write] |
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:
setCursor( IbeamCursor );
If no cursor has been set, or after a call to unsetCursor(), the parent's cursor is used. The function unsetCursor() has no effect on top-level widgets.
bool QWidget::customWhatsThis [read] |
whether the widget wants to handle What's This help manually
The default implementation of customWhatsThis() returns FALSE, which means the widget will not receive any events in Whats This mode.
The widget may leave What's This mode by calling QWhatsThis::leaveWhatsThisMode(), with or without actually displaying any help text.
You can also reimplement customWhatsThis() if your widget is a "passive interactor" supposed to work under all circumstances. Simply don't call QWhatsThis::leaveWhatsThisMode() in that case.
bool QWidget::enabled [read, write] |
whether the widget is enabled
An enabled widget receives keyboard and mouse events; a disabled widget does not. In fact, an enabled widget only receives keyboard events when it is in focus.
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 reimplement the enabledChange() function.
Disabling a widget implicitly disables all its children. Enabling respectively enables all child widgets unless they have been explicitly disabled.
bool QWidget::focus [read] |
whether this widget (or its focus proxy) has the keyboard input focus
Effectively equivalent to {qApp->focusWidget()
== this}.
bool QWidget::focusEnabled [read] |
whether the widget accepts keyboard focus
Keyboard focus is initially disabled (i.e. focusPolicy() == QWidget::NoFocus
).
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(QWidget::StrongFocus).
QWidget::FocusPolicy QWidget::focusPolicy [inline, read, write] |
the way the widget accepts keyboard focus
The policy is QWidget::TabFocus
if the widget accepts keyboard focus by tabbing, QWidget::ClickFocus
if the widget accepts focus by clicking, QWidget::StrongFocus
if it accepts both, and QWidget::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(QWidget::StrongFocus).
QFont QWidget::font [inline, read, write] |
the font currently set for the widget
The fontInfo() function reports the actual font that is being used by the widget.
As long as no special font has been set, or after unsetFont() is called, this is either a special font for the widget class, the parent's font or (if this widget is a top level widget), the default application font.
This code fragment sets a 12 point helvetica bold font:
QFont f( "Helvetica", 12, QFont::Bold ); setFont( f );
In addition to setting the font, setFont() informs all children about the change.
QRect QWidget::frameGeometry [read] |
geometry of the widget relative to its parent including any window frame
See the Window Geometry documentation for an overview of geometry issues with top-level widgets.
QSize QWidget::frameSize [read] |
the size of the widget including any window frame
bool QWidget::fullScreen [read] |
whether the widget is full screen
const QRect & QWidget::geometry [inline, read, write] |
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().
setGeometry() is virtual, and all other overloaded setGeometry() implementations in Qt call it.
See the Window Geometry documentation for an overview of top-level widget geometry.
int QWidget::height [inline, read] |
the height of the widget excluding any window frame
See the Window Geometry documentation for an overview of top-level widget geometry.
bool QWidget::hidden [read, write] |
whether the widget is explicitly hidden
If FALSE, the widget is visible or would become visible if all its ancestors became visible.
QPixmap QWidget::icon [read, write] |
the widget's icon
This property only makes sense for top-level widgets. If no icon has been set, icon() returns 0.
Reimplementado en QMessageBox.
QString QWidget::iconText [read, write] |
the widget's icon text
This property only makes sense for top-level widgets. If no icon text has been set, this functions returns QString::null.
bool QWidget::inputMethodEnabled [read, write] |
enables or disables the use of input methods for this widget.
Most Widgets (as eg. buttons) that do not handle text input should have the input method disabled if they have focus. This is the default.
If a widget handles text input it should set this property to TRUE.
bool QWidget::isActiveWindow [read] |
whether this widget is the active window
The active window is the window that contains the widget that has keyboard focus.
When popup windows are visible, this property is TRUE for both the active window and for the popup.
bool QWidget::isDesktop [inline, read] |
whether the widget is a desktop widget, i.e. represents the desktop
A desktop widget is also a top-level widget.
bool QWidget::isDialog [inline, read] |
whether the widget is a dialog widget
A dialog widget is a secondary top-level widget, i.e. a top-level widget with a parent.
bool QWidget::isModal [inline, read] |
whether the widget is a modal widget
This property only makes sense for top-level widgets. A modal widget prevents widgets in all other top-level widgets from getting any input.
bool QWidget::isPopup [inline, read] |
whether the widget is a popup widget
A popup widget is created by specifying the widget flag WType_Popup
to the widget constructor. A popup widget is also a top-level widget.
bool QWidget::isTopLevel [inline, read] |
whether the widget is a top-level widget
A top-level widget is a widget which usually has a frame and a caption (title). Popup and desktop widgets are also top-level widgets.
A top-level widget 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 top-level, even if a parent widget is specified in the constructor. This behavior is specified by the WType_TopLevel
widget flag.
bool QWidget::maximized [read] |
whether this widget is maximized
This property is only relevant for top-level widgets.
Note that due to limitations in some window-systems, this does not always report the expected results (e.g. if the user on X11 maximizes the window via the window manager, Qt has no way of distinguishing this from any other resize). This is expected to improve as window manager protocols evolve.
int QWidget::maximumHeight [inline, read, write] |
the widget's maximum height
This property corresponds to maximumSize().height().
QSize QWidget::maximumSize [read, write] |
the widget's maximum size
The widget cannot be resized to a larger size than the maximum widget size.
int QWidget::maximumWidth [inline, read, write] |
the widget's maximum width
This property corresponds to maximumSize().width().
QRect QWidget::microFocusHint [read] |
the currently set micro focus hint for this widget.
See the documentation of setMicroFocusHint() for more information.
bool QWidget::minimized [read] |
whether this widget is minimized (iconified)
This property is only relevant for top-level widgets.
int QWidget::minimumHeight [inline, read, write] |
the widget's minimum height
This property corresponds to minimumSize().height().
QSize QWidget::minimumSize [read, write] |
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.
If you use a layout inside the widget, the minimum size will be set by the layout and not by setMinimumSize(), unless you set the layout's resize mode to QLayout::FreeResize.
QSize QWidget::minimumSizeHint [read] |
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 minimumSizeHint.
int QWidget::minimumWidth [inline, read, write] |
the widget's minimum width
This property corresponds to minimumSize().width().
bool QWidget::mouseTracking [read, write] |
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.
bool QWidget::ownCursor [inline, read] |
whether the widget uses its own cursor
If FALSE, the widget uses its parent widget's cursor.
bool QWidget::ownFont [inline, read] |
whether the widget uses its own font
If FALSE, the widget uses its parent widget's font.
bool QWidget::ownPalette [inline, read] |
whether the widget uses its own palette
If FALSE, the widget uses its parent widget's palette.
const QPalette & QWidget::palette [inline, read, write] |
the widget's palette
As long as no special palette has been set, or after unsetPalette() has been called, this is either a special palette for the widget class, the parent's palette or (if this widget is a top level widget), the default application palette.
Instead of defining an entirely new palette, you can also use the paletteBackgroundColor, paletteBackgroundPixmap and paletteForegroundColor convenience properties to change a widget's background and foreground appearance only.
QColor QWidget::paletteBackgroundColor [read, write] |
the background color of the widget
The palette background color is usually set implicitly by setBackgroundMode(), although it can also be set explicitly by setPaletteBackgroundColor(). setPaletteBackgroundColor() is a convenience function that creates and sets a modified QPalette with setPalette(). The palette is modified according to the widget's background mode. For example, if the background mode is PaletteButton
the color used for the palette's QColorGroup::Button
color entry is set.
If there is a background pixmap (set using setPaletteBackgroundPixmap()), then the return value of this function is indeterminate.
QPixmap QWidget::paletteBackgroundPixmap [read, write] |
the background pixmap of the widget
The palette background pixmap is usually set implicitly by setBackgroundMode(), although it can also be set explicitly by setPaletteBackgroundPixmap(). setPaletteBackgroundPixmap() is a convenience function that creates and sets a modified QPalette with setPalette(). The palette is modified according to the widget's background mode. For example, if the background mode is PaletteButton
the pixmap used for the palette's QColorGroup::Button
color entry is set.
If there is a plain background color (set using setPaletteBackgroundColor()), then this function returns 0.
QColor QWidget::paletteForegroundColor [read, write] |
the foreground color of the widget
setPaletteForegroundColor() is a convenience function that creates and sets a modified QPalette with setPalette(). The palette is modified according to the widget's {background mode}. For example, if the background mode is PaletteButton
the palette entry QColorGroup::ButtonText
is set to color.
QPoint QWidget::pos [read, write] |
the position of the widget within its parent widget
If the widget is a top-level widget, 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.
move() is virtual, and all other overloaded move() implementations in Qt call it.
See the Window Geometry documentation for an overview of top-level widget geometry.
QRect QWidget::rect [inline, read] |
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 top-level widget geometry.
bool QWidget::shown [read, write] |
whether the widget is shown
If TRUE, the widget is visible or would become visible if all its ancestors became visible.
QSize QWidget::size [inline, read, write] |
the size of the widget excluding any window frame
When resizing, the widget, if visible, 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(). Furthermore, the size is always at least QSize(1, 1). For toplevel widgets, the minimum size might be larger, depending on the window manager.
If you want a top-level window to have a fixed size, call setResizeMode( QLayout::FreeResize ) on its layout.
resize() is virtual, and all other overloaded resize() implementations in Qt call it.
QSize QWidget::sizeHint [read] |
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.
Reimplementado en Spacer.
QSize QWidget::sizeIncrement [read, write] |
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:
width = baseSize().width() + i * sizeIncrement().width(); height = baseSize().height() + j * sizeIncrement().height();
Note that while you can set the size increment for all widgets, it only affects top-level widgets.
QSizePolicy QWidget::sizePolicy [read, write] |
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 scrollbars (usually subclasses of QScrollView) tend to specify that they can use additional space, and that they can make do with less than sizeHint().
bool QWidget::underMouse [read] |
whether the widget is under the mouse cursor
This value is not updated properly during drag and drop operations.
bool QWidget::updatesEnabled [read, write] |
whether updates are enabled
Calling update() and repaint() has no effect if updates are disabled. Paint events from the window system are processed normally even if updates are disabled.
setUpdatesEnabled() is normally used to disable updates for a short period of time, for instance to avoid screen flicker during large changes.
Example:
setUpdatesEnabled( FALSE ); bigVisualChanges(); setUpdatesEnabled( TRUE ); repaint();
bool QWidget::visible [read] |
whether the widget is visible
Calling show() sets the widget to visible status if all its parent widgets up to the top-level widget are visible. If an ancestor is not visible, the widget won't become visible until all its ancestors are shown.
Calling 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 top-level widgets 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.
QRect QWidget::visibleRect [read] |
the visible rectangle
No longer necessary, you can simply call repaint(). If you do not need the rectangle for repaint(), use clipRegion() instead.
int QWidget::width [inline, read] |
the width of the widget excluding any window frame
See the Window Geometry documentation for an overview of top-level widget geometry.
Reimplementado en QSDialogPrivate.
double QWidget::windowOpacity [read, write] |
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 only present on Mac OS X and Windows 2000 and up.
int QWidget::x [read] |
the x coordinate of the widget relative to its parent including any window frame
See the Window Geometry documentation for an overview of top-level widget geometry.
int QWidget::y [read] |
the y coordinate of the widget relative to its parent and including any window frame
See the Window Geometry documentation for an overview of top-level widget geometry.