📄 qtabwidget.3qt
字号:
.TP\fCQTabWidget::Bottom\fR - below the pages.SH "QTabWidget::TabShape"This enum type defines the shape of the tabs:.TP\fCQTabWidget::Rounded\fR - rounded look (normal).TP\fCQTabWidget::Triangular\fR - triangular look (very unusual, included for completeness).SH MEMBER FUNCTION DOCUMENTATION.SH "QTabWidget::QTabWidget ( QWidget * parent = 0, const char * name = 0, WFlags f = 0 )"Constructs a tabbed widget called \fIname\fR with parent \fIparent\fR, and widget flags \fIf\fR..SH "void QTabWidget::addTab ( QWidget * child, const QString & label )\fC [virtual]\fR"Adds another tab and page to the tab view..PPThe new page is \fIchild\fR; the tab's label is \fIlabel\fR. Note the difference between the widget name (which you supply to widget constructors and to setTabEnabled(), for example) and the tab label. The name is internal to the program and invariant, whereas the label is shown on-screen and may vary according to language and other factors..PPIf the tab's \fIlabel\fR contains an ampersand, the letter following the ampersand is used as an accelerator for the tab, e.g. if the label is "Bro&wse" then Alt+W becomes an accelerator which will move the focus to this tab..PPIf you call addTab() after show() the screen will flicker and the user may be confused..PPSee also insertTab()..PPExamples:.)l addressbook/centralwidget.cpp and themes/themes.cpp..SH "void QTabWidget::addTab ( QWidget * child, const QIconSet & iconset, const QString & label )\fC [virtual]\fR"This is an overloaded member function, provided for convenience. It behaves essentially like the above function..PPAdds another tab and page to the tab view..PPThis function is the same as addTab(), but with an additional \fIiconset\fR..SH "void QTabWidget::addTab ( QWidget * child, QTab * tab )\fC [virtual]\fR"This is an overloaded member function, provided for convenience. It behaves essentially like the above function..PPThis is a low-level function for adding tabs. It is useful if you are using setTabBar() to set a QTabBar subclass with an overridden QTabBar::paint() function for a subclass of QTab. The \fIchild\fR is the new page and \fItab\fR is the tab to put the \fIchild\fR on..SH "void QTabWidget::changeTab ( QWidget * w, const QString & label )"Defines a new \fIlabel\fR for page \fIw\fR's tab..SH "void QTabWidget::changeTab ( QWidget * w, const QIconSet & iconset, const QString & label )"This is an overloaded member function, provided for convenience. It behaves essentially like the above function..PPDefines a new \fIiconset\fR and a new \fIlabel\fR for page \fIw\fR's tab..SH "int QTabWidget::count () const"Returns the number of tabs in the tab bar. See the "count" property for details..SH "void QTabWidget::currentChanged ( QWidget * )\fC [signal]\fR"This signal is emitted whenever the current page changes. The parameter is the new current page..PPSee also currentPage(), showPage(), and tabLabel()..SH "QWidget * QTabWidget::currentPage () const"Returns a pointer to the page currently being displayed by the tab dialog. The tab dialog does its best to make sure that this value is never 0 (but if you try hard enough, it can be)..SH "int QTabWidget::currentPageIndex () const"Returns the index position of the current tab page. See the "currentPage" property for details..SH "int QTabWidget::indexOf ( QWidget * w ) const"Returns the index position of page \fIw\fR, or -1 if the widget cannot be found..SH "void QTabWidget::insertTab ( QWidget * child, const QString & label, int index = -1 )\fC [virtual]\fR"Inserts another tab and page to the tab view..PPThe new page is \fIchild\fR; the tab's label is \fIlabel\fR. Note the difference between the widget name (which you supply to widget constructors and to setTabEnabled(), for example) and the tab label. The name is internal to the program and invariant, whereas the label is shown on-screen and may vary according to language and other factors..PPIf the tab's \fIlabel\fR contains an ampersand, the letter following the ampersand is used as an accelerator for the tab, e.g. if the label is "Bro&wse" then Alt+W becomes an accelerator which will move the focus to this tab..PPIf \fIindex\fR is not specified, the tab is simply appended. Otherwise it is inserted at the specified position..PPIf you call insertTab() after show(), the screen will flicker and the user may be confused..PPSee also addTab()..SH "void QTabWidget::insertTab ( QWidget * child, const QIconSet & iconset, const QString & label, int index = -1 )\fC [virtual]\fR"This is an overloaded member function, provided for convenience. It behaves essentially like the above function..PPInserts another tab and page to the tab view..PPThis function is the same as insertTab(), but with an additional \fIiconset\fR..SH "void QTabWidget::insertTab ( QWidget * child, QTab * tab, int index = -1 )\fC [virtual]\fR"This is an overloaded member function, provided for convenience. It behaves essentially like the above function..PPThis is a lower-level method for inserting tabs, similar to the other insertTab() method. It is useful if you are using setTabBar() to set a QTabBar subclass with an overridden QTabBar::paint() function for a subclass of QTab. The \fIchild\fR is the new page, \fItab\fR is the tab to put the \fIchild\fR on and \fIindex\fR is the position in the tab bar that this page should occupy..SH "bool QTabWidget::isTabEnabled ( QWidget * w ) const"Returns TRUE if the page \fIw\fR is enabled; otherwise returns FALSE..PPSee also setTabEnabled() and QWidget::enabled..SH "QString QTabWidget::label ( int index ) const"Returns the label of the tab at index position \fIindex\fR or QString::null if the \fIindex\fR is out of range..SH "int QTabWidget::margin () const"Returns the margin in this tab widget. See the "margin" property for details..SH "QWidget * QTabWidget::page ( int index ) const"Returns the tab page at index position \fIindex\fR or 0 if the \fIindex\fR is out of range..SH "void QTabWidget::removePage ( QWidget * w )\fC [virtual slot]\fR"Removes page \fIw\fR from this stack of widgets. Does not delete \fIw\fR..PPSee also showPage() and QWidgetStack::removeWidget()..SH "void QTabWidget::removeTabToolTip ( QWidget * w )"Removes the tab tool tip for page \fIw\fR. If the page does not have a tip, nothing happens..PPSee also setTabToolTip() and tabToolTip()..SH "void QTabWidget::setCurrentPage ( int )\fC [slot]\fR"Sets the index position of the current tab page. See the "currentPage" property for details..SH "void QTabWidget::setMargin ( int )"Sets the margin in this tab widget. See the "margin" property for details..SH "void QTabWidget::setTabBar ( QTabBar * tb )\fC [protected]\fR"Replaces the dialog's QTabBar heading with the tab bar \fItb\fR. Note that this must be called \fIbefore\fR any tabs have been added, or the behavior is undefined..PPSee also tabBar()..SH "void QTabWidget::setTabEnabled ( QWidget * w, bool enable )"If \fIenable\fR is TRUE, page \fIw\fR is enabled; otherwise page \fIw\fR is disabled. The page's tab is redrawn appropriately..PPQTabWidget uses QWidget::setEnabled() internally, rather than keeping a separate flag..PPNote that even a disabled tab/page may be visible. If the page is visible already, QTabWidget will not hide it; if all the pages are disabled, QTabWidget will show one of them..PPSee also isTabEnabled() and QWidget::enabled..SH "void QTabWidget::setTabIconSet ( QWidget * w, const QIconSet & iconset )"Sets the iconset for page \fIw\fR to \fIiconset\fR..SH "void QTabWidget::setTabLabel ( QWidget * w, const QString & l )"Sets the tab label for page \fIw\fR to \fIl\fR.SH "void QTabWidget::setTabPosition ( TabPosition )"Sets the position of the tabs in this tab widget. See the "tabPosition" property for details..SH "void QTabWidget::setTabShape ( TabShape s )"Sets the shape of the tabs in this tab widget to \fIs\fR. See the "tabShape" property for details..SH "void QTabWidget::setTabToolTip ( QWidget * w, const QString & tip )"Sets the tab tool tip for page \fIw\fR to \fItip\fR..PPSee also removeTabToolTip() and tabToolTip()..SH "void QTabWidget::showPage ( QWidget * w )\fC [virtual slot]\fR"Ensures that page \fIw\fR is shown. This is useful mainly for accelerators..PP\fBWarning:\fR Used carelessly, this function can easily surprise or confuse the user..PPSee also QTabBar::currentTab..SH "QTabBar * QTabWidget::tabBar () const\fC [protected]\fR"Returns the current QTabBar..PPSee also setTabBar()..SH "QIconSet QTabWidget::tabIconSet ( QWidget * w ) const"Returns the iconset of page \fIw\fR or a null iconset if \fIw\fR is not a tab page or does not have an iconset..SH "QString QTabWidget::tabLabel ( QWidget * w ) const"Returns the label text for the tab on page \fIw\fR..SH "TabPosition QTabWidget::tabPosition () const"Returns the position of the tabs in this tab widget. See the "tabPosition" property for details..SH "TabShape QTabWidget::tabShape () const"Returns the shape of the tabs in this tab widget. See the "tabShape" property for details..SH "QString QTabWidget::tabToolTip ( QWidget * w ) const"Returns the tab tool tip for page \fIw\fR or QString::null if no tool tip has been set..PPSee also setTabToolTip() and removeTabToolTip()..SS "Property Documentation".SH "bool autoMask"This property holds whether the tab widget is automatically masked..PPSee also QWidget::autoMask..SH "int count"This property holds the number of tabs in the tab bar..PPGet this property's value with count()..SH "int currentPage"This property holds the index position of the current tab page..PPSet this property's value with setCurrentPage() and get this property's value with currentPageIndex()..PPSee also QTabBar::currentTab..SH "int margin"This property holds the margin in this tab widget..PPThe margin is the distance between the innermost pixel of the frame and the outermost pixel of the pages..PPSet this property's value with setMargin() and get this property's value with margin()..SH "TabPosition tabPosition"This property holds the position of the tabs in this tab widget..PPPossible values for this property are QTabWidget::Top and QTabWidget::Bottom..PPSee also TabPosition..PPSet this property's value with setTabPosition() and get this property's value with tabPosition()..SH "TabShape tabShape"This property holds the shape of the tabs in this tab widget..PPPossible values for this property are QTabWidget::Rounded (default) or QTabWidget::Triangular..PPSee also TabShape..PPSet this property's value with setTabShape() and get this property's value with tabShape()..SH "SEE ALSO".BR http://doc.trolltech.com/qtabwidget.html.BR http://www.trolltech.com/faq/tech.html.SH COPYRIGHTCopyright 1992-2001 Trolltech AS, http://www.trolltech.com. See thelicense file included in the distribution for a complete licensestatement..SH AUTHORGenerated automatically from the source code..SH BUGSIf you find a bug in Qt, please report it as described in.BR http://doc.trolltech.com/bughowto.html .Good bug reports help us to help you. Thank you..PThe definitive Qt documentation is provided in HTML format; it islocated at $QTDIR/doc/html and can be read using Qt Assistant or witha web browser. This man page is provided as a convenience for thoseusers who prefer man pages, although this format is not officiallysupported by Trolltech. .PIf you find errors in this manual page, please report them to.BR qt-bugs@trolltech.com .Please include the name of the manual page (qtabwidget.3qt) and the Qtversion (3.1.1).
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -