📄 qwidget.3qt
字号:
.BI "QCursor \fBcursor\fR - the cursor shape for this widget".br.ti -1c.BI "bool \fBcustomWhatsThis\fR - whether the widget wants to handle What's This help manually \fI(read " "only" ")\fR".br.ti -1c.BI "bool \fBenabled\fR - whether the widget is enabled".br.ti -1c.BI "bool \fBfocus\fR - whether this widget (or its focus " "proxy" ") has the keyboard input focus \fI(read " "only" ")\fR".br.ti -1c.BI "bool \fBfocusEnabled\fR - whether the widget accepts keyboard focus \fI(read " "only" ")\fR".br.ti -1c.BI "FocusPolicy \fBfocusPolicy\fR - the way the widget accepts keyboard focus".br.ti -1c.BI "QFont \fBfont\fR - the font currently set for the widget".br.ti -1c.BI "QRect \fBframeGeometry\fR - geometry of the widget relative to its parent including any window frame \fI(read " "only" ")\fR".br.ti -1c.BI "QSize \fBframeSize\fR - the size of the widget including any window frame \fI(read " "only" ")\fR".br.ti -1c.BI "QRect \fBgeometry\fR - the geometry of the widget relative to its parent and excluding the window frame".br.ti -1c.BI "int \fBheight\fR - the height of the widget excluding any window frame \fI(read " "only" ")\fR".br.ti -1c.BI "bool \fBhidden\fR - whether the widget is explicitly hidden \fI(read " "only" ")\fR".br.ti -1c.BI "QPixmap \fBicon\fR - the widget icon pixmap".br.ti -1c.BI "QString \fBiconText\fR - the widget icon text".br.ti -1c.BI "bool \fBisActiveWindow\fR - whether this widget is the active window or a child of it \fI(read " "only" ")\fR".br.ti -1c.BI "bool \fBisDesktop\fR - whether the widget is a desktop widget \fI(read " "only" ")\fR".br.ti -1c.BI "bool \fBisDialog\fR - whether the widget is a dialog widget \fI(read " "only" ")\fR".br.ti -1c.BI "bool \fBisModal\fR - whether the widget is a modal widget \fI(read " "only" ")\fR".br.ti -1c.BI "bool \fBisPopup\fR - whether the widget is a popup widget \fI(read " "only" ")\fR".br.ti -1c.BI "bool \fBisTopLevel\fR - whether the widget is a top-level widget \fI(read " "only" ")\fR".br.ti -1c.BI "int \fBmaximumHeight\fR - the widget's maximum height".br.ti -1c.BI "QSize \fBmaximumSize\fR - the widget's maximum size".br.ti -1c.BI "int \fBmaximumWidth\fR - the widget's maximum width".br.ti -1c.BI "QRect \fBmicroFocusHint\fR - the currently set micro focus hint for this widget \fI(read " "only" ")\fR".br.ti -1c.BI "bool \fBminimized\fR - whether this widget is minimized (iconified) \fI(read " "only" ")\fR".br.ti -1c.BI "int \fBminimumHeight\fR - the widget's minimum height".br.ti -1c.BI "QSize \fBminimumSize\fR - the widget's minimum size".br.ti -1c.BI "QSize \fBminimumSizeHint\fR - the recommended minimum size for the widget \fI(read " "only" ")\fR".br.ti -1c.BI "int \fBminimumWidth\fR - the widget's minimum width".br.ti -1c.BI "bool \fBmouseTracking\fR - whether mouse tracking is enabled for this widget".br.ti -1c.BI "bool \fBownCursor\fR - whether the widget uses its own cursor \fI(read " "only" ")\fR".br.ti -1c.BI "bool \fBownFont\fR - whether the widget uses its own font \fI(read " "only" ")\fR".br.ti -1c.BI "bool \fBownPalette\fR - whether the widget uses its own palette \fI(read " "only" ")\fR".br.ti -1c.BI "QPalette \fBpalette\fR - the widget's palette".br.ti -1c.BI "QColor \fBpaletteBackgroundColor\fR - the background color of the widget".br.ti -1c.BI "QPixmap \fBpaletteBackgroundPixmap\fR - the background pixmap of the widget".br.ti -1c.BI "QColor \fBpaletteForegroundColor\fR - the foreground color of the widget".br.ti -1c.BI "QPoint \fBpos\fR - the position of the widget in its parent widget".br.ti -1c.BI "QRect \fBrect\fR - the internal geometry of the widget excluding any window frame \fI(read " "only" ")\fR".br.ti -1c.BI "QSize \fBsize\fR - the size of the widget excluding any window frame".br.ti -1c.BI "QSize \fBsizeHint\fR - the recommended size for the widget \fI(read " "only" ")\fR".br.ti -1c.BI "QSize \fBsizeIncrement\fR - the size increment of the widget".br.ti -1c.BI "QSizePolicy \fBsizePolicy\fR - the default layout behavior of the widget".br.ti -1c.BI "bool \fBunderMouse\fR - whether the widget is under the mouse cursor \fI(read " "only" ")\fR".br.ti -1c.BI "bool \fBupdatesEnabled\fR - whether updates are enabled".br.ti -1c.BI "bool \fBvisible\fR - whether the widget is visible \fI(read " "only" ")\fR".br.ti -1c.BI "QRect \fBvisibleRect\fR - the currently visible rectangle of the widget \fI(read " "only" ")\fR".br.ti -1c.BI "int \fBwidth\fR - the width of the widget excluding any window frame \fI(read " "only" ")\fR".br.ti -1c.BI "int \fBx\fR - the x coordinate of the widget relative to its parent including any window frame \fI(read " "only" ")\fR".br.ti -1c.BI "int \fBy\fR - the y coordinate of the widget relative to its parent and including any window frame \fI(read " "only" ")\fR".br.in -1c.SS "Protected Members".in +1c.ti -1c.BI "virtual bool \fBevent\fR ( QEvent * e )".br.ti -1c.BI "virtual void \fBmousePressEvent\fR ( QMouseEvent * e )".br.ti -1c.BI "virtual void \fBmouseReleaseEvent\fR ( QMouseEvent * e )".br.ti -1c.BI "virtual void \fBmouseDoubleClickEvent\fR ( QMouseEvent * e )".br.ti -1c.BI "virtual void \fBmouseMoveEvent\fR ( QMouseEvent * e )".br.ti -1c.BI "virtual void \fBwheelEvent\fR ( QWheelEvent * e )".br.ti -1c.BI "virtual void \fBkeyPressEvent\fR ( QKeyEvent * e )".br.ti -1c.BI "virtual void \fBkeyReleaseEvent\fR ( QKeyEvent * e )".br.ti -1c.BI "virtual void \fBfocusInEvent\fR ( QFocusEvent * )".br.ti -1c.BI "virtual void \fBfocusOutEvent\fR ( QFocusEvent * )".br.ti -1c.BI "virtual void \fBenterEvent\fR ( QEvent * )".br.ti -1c.BI "virtual void \fBleaveEvent\fR ( QEvent * )".br.ti -1c.BI "virtual void \fBpaintEvent\fR ( QPaintEvent * )".br.ti -1c.BI "virtual void \fBmoveEvent\fR ( QMoveEvent * )".br.ti -1c.BI "virtual void \fBresizeEvent\fR ( QResizeEvent * )".br.ti -1c.BI "virtual void \fBcloseEvent\fR ( QCloseEvent * e )".br.ti -1c.BI "virtual void \fBcontextMenuEvent\fR ( QContextMenuEvent * e )".br.ti -1c.BI "virtual void \fBimStartEvent\fR ( QIMEvent * e )".br.ti -1c.BI "virtual void \fBimComposeEvent\fR ( QIMEvent * e )".br.ti -1c.BI "virtual void \fBimEndEvent\fR ( QIMEvent * e )".br.ti -1c.BI "virtual void \fBtabletEvent\fR ( QTabletEvent * e )".br.ti -1c.BI "virtual void \fBdragEnterEvent\fR ( QDragEnterEvent * )".br.ti -1c.BI "virtual void \fBdragMoveEvent\fR ( QDragMoveEvent * )".br.ti -1c.BI "virtual void \fBdragLeaveEvent\fR ( QDragLeaveEvent * )".br.ti -1c.BI "virtual void \fBdropEvent\fR ( QDropEvent * )".br.ti -1c.BI "virtual void \fBshowEvent\fR ( QShowEvent * )".br.ti -1c.BI "virtual void \fBhideEvent\fR ( QHideEvent * )".br.ti -1c.BI "virtual bool \fBwinEvent\fR ( MSG * )".br.ti -1c.BI "virtual bool \fBx11Event\fR ( XEvent * )".br.ti -1c.BI "virtual void \fBupdateMask\fR ()".br.ti -1c.BI "virtual void \fBstyleChange\fR ( QStyle & oldStyle )".br.ti -1c.BI "virtual void \fBenabledChange\fR ( bool oldEnabled )".br.ti -1c.BI "virtual void \fBpaletteChange\fR ( const QPalette & oldPalette )".br.ti -1c.BI "virtual void \fBfontChange\fR ( const QFont & oldFont )".br.ti -1c.BI "virtual void \fBwindowActivationChange\fR ( bool oldActive )".br.ti -1c.BI "virtual int \fBmetric\fR ( int m ) const".br.ti -1c.BI "void \fBresetInputContext\fR ()".br.ti -1c.BI "virtual void \fBcreate\fR ( WId window = 0, bool initializeWindow = TRUE, bool destroyOldWindow = TRUE )".br.ti -1c.BI "virtual void \fBdestroy\fR ( bool destroyWindow = TRUE, bool destroySubWindows = TRUE )".br.ti -1c.BI "WFlags \fBgetWFlags\fR () const".br.ti -1c.BI "virtual void \fBsetWFlags\fR ( WFlags f )".br.ti -1c.BI "void \fBclearWFlags\fR ( WFlags f )".br.ti -1c.BI "virtual bool \fBfocusNextPrevChild\fR ( bool next )".br.ti -1c.BI "QFocusData * \fBfocusData\fR ()".br.ti -1c.BI "virtual void \fBsetKeyCompression\fR ( bool compress )".br.ti -1c.BI "virtual void \fBsetMicroFocusHint\fR ( int x, int y, int width, int height, bool text = TRUE, QFont * f = 0 )".br.in -1c.SH DESCRIPTIONThe QWidget class is the base class of all user interface objects..PPThe 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..PPA 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 (though it is also possible to create top level widgets without such decoration by the use of widget flags). In Qt, QMainWindow and the various subclasses of QDialog are the most common top-level windows..PPA widget without a parent widget is always a top-level widget..PPNon-top-level widgets are child widgets. These are child windows in their parent widgets. You usually cannot distinguish a child widget from its parent visually. Most other widgets in Qt are useful only as child widgets. (You can make a e.g. button into a top-level widget, but most people prefer to put their buttons in e.g. dialogs.).PPQWidget has many member functions, but some of them have little direct functionality: for example, QWidget it has a font property, but never uses this itself. There are many subclasses which provide real functionality, as diverse as QPushButton, QListBox and QTabDialog..SH "Groups of functions:".TPWindow functions: show(), hide(), raise(), lower(), close()..IP.TPTop level windows: caption(), setCaption(), icon(), setIcon(), iconText(), setIconText(), isActiveWindow(), setActiveWindow(), showMinimized(). showMaximized(), showFullScreen(), showNormal()..IP.TPWindow contents: update(), repaint(), erase(), scroll(), updateMask()..IP.TPGeometry: pos(), size(), rect(), x(), y(), width(), height(), sizePolicy(), setSizePolicy(), sizeHint(), updateGeometry(), layout(), move(), resize(), setGeometry(), frameGeometry(), geometry(), childrenRect(), adjustSize(), mapFromGlobal(), mapFromParent() mapToGlobal(), mapToParent(), maximumSize(), minimumSize(), sizeIncrement(), setMaximumSize(), setMinimumSize(), setSizeIncrement(), setBaseSize(), setFixedSize().IP.TPMode: isVisible(), isVisibleTo(), visibleRect(), isMinimized(), isDesktop(), isEnabled(), isEnabledTo(), isModal(), isPopup(), isTopLevel(), setEnabled(), hasMouseTracking(), setMouseTracking(), isUpdatesEnabled(), setUpdatesEnabled(),.IP.TPLook and feel: style(), setStyle(), cursor(), setCursor() font(), setFont(), palette(), setPalette(), backgroundMode(), setBackgroundMode(), colorGroup(), fontMetrics(), fontInfo()..IP.TPKeyboard focus functions: isFocusEnabled(), setFocusPolicy(), focusPolicy(), hasFocus(), setFocus(), clearFocus(), setTabOrder(), setFocusProxy().
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -