⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 qcombotableitem.3qt

📁 Linux下的基于X11的图形开发环境。
💻 3QT
字号:
'\" t.TH QComboTableItem 3qt "9 December 2002" "Trolltech AS" \" -*- nroff -*-.\" Copyright 1992-2001 Trolltech AS.  All rights reserved.  See the.\" license file included in the distribution for a complete license.\" statement..\".ad l.nh.SH NAMEQComboTableItem \- Means of using comboboxes in QTables.SH SYNOPSIS\fC#include <qtable.h>\fR.PPInherits QTableItem..PP.SS "Public Members".in +1c.ti -1c.BI "\fBQComboTableItem\fR ( QTable * table, const QStringList & list, bool editable = FALSE )".br.ti -1c.BI "virtual void \fBsetCurrentItem\fR ( int i )".br.ti -1c.BI "virtual void \fBsetCurrentItem\fR ( const QString & s )".br.ti -1c.BI "int \fBcurrentItem\fR () const".br.ti -1c.BI "QString \fBcurrentText\fR () const".br.ti -1c.BI "int \fBcount\fR () const".br.ti -1c.BI "QString \fBtext\fR ( int i ) const".br.ti -1c.BI "virtual void \fBsetEditable\fR ( bool b )".br.ti -1c.BI "bool \fBisEditable\fR () const".br.ti -1c.BI "virtual void \fBsetStringList\fR ( const QStringList & l )".br.ti -1c.BI "virtual int \fBrtti\fR () const".br.in -1c.SH DESCRIPTIONThe QComboTableItem class provides a means of using comboboxes in QTables..PPA QComboTableItem is a table item which looks and behaves like a combobox. The advantage of using QComboTableItems rather than real comboboxes is that a QComboTableItem uses far less resources than real comboboxes in QTables. When the cell has the focus it displays a real combobox which the user can interact with. When the cell does not have the focus the cell \fIlooks\fR like a combobox. Only text items (i.e. no pixmaps) may be used in QComboTableItems..PPQComboTableItem items have the edit type WhenCurrent (see EditType). The QComboTableItem's list of items is provided by a QStringList passed to the constructor..PPThe list of items may be changed using setStringList(). The current item can be set with setCurrentItem() and retrieved with currentItem(). The text of the current item can be obtained with currentText(), and the text of a particular item can be retrieved with text()..PPIf isEditable() is TRUE the QComboTableItem will permit the user to either choose an existing list item, or create a new list item by entering their own text; otherwise the user may only choose one of the existing list items..PPTo populate a table cell with a QComboTableItem use QTable::setItem()..PPQComboTableItems may be deleted with QTable::clearCell()..PPQComboTableItems can be distinguished from QTableItems and QCheckTableItems using their Run Time Type Identification number (see rtti())..PP<center>.ce 1.B "[Image Omitted]".PP</center>.PPSee also QCheckTableItem, QTableItem, QComboBox, and Advanced Widgets..SH MEMBER FUNCTION DOCUMENTATION.SH "QComboTableItem::QComboTableItem ( QTable * table, const QStringList & list, bool editable = FALSE )"Creates a combo table item for the table \fItable\fR. The combobox's list of items is passed in the \fIlist\fR argument. If \fIeditable\fR is TRUE the user may type in new list items; if \fIeditable\fR is FALSE the user may only select from the list of items provided..PPBy default QComboTableItems cannot be replaced by other table items since isReplaceable() returns FALSE by default..PPSee also QTable::clearCell() and EditType..SH "int QComboTableItem::count () const"Returns the total number of list items in the combo table item..SH "int QComboTableItem::currentItem () const"Returns the index of the combo table item's current list item..PPSee also setCurrentItem()..SH "QString QComboTableItem::currentText () const"Returns the text of the combo table item's current list item..PPSee also currentItem() and text()..SH "bool QComboTableItem::isEditable () const"Returns TRUE if the user can add their own list items to the combobox's list of items; otherwise returns FALSE..PPSee also setEditable()..SH "int QComboTableItem::rtti () const\fC [virtual]\fR"Returns 1..PPMake your derived classes return their own values for rtti()to distinguish between different table item subclasses. You should use values greater than 1000, preferably a large random number, to allow for extensions to this class..PPSee also QTableItem::rtti()..PPReimplemented from QTableItem..SH "void QComboTableItem::setCurrentItem ( int i )\fC [virtual]\fR"Sets the list item \fIi\fR to be the combo table item's current list item..PPSee also currentItem()..PPExample: table/small-table-demo/main.cpp..SH "void QComboTableItem::setCurrentItem ( const QString & s )\fC [virtual]\fR"This is an overloaded member function, provided for convenience. It behaves essentially like the above function..PPSets the list item whose text is \fIs\fR to be the combo table item's current list item. Does nothing if no list item has the text \fIs\fR..PPSee also currentItem()..SH "void QComboTableItem::setEditable ( bool b )\fC [virtual]\fR"If \fIb\fR is TRUE the combo table item can be edited, i.e. the user may enter a new text item themselves. If \fIb\fR is FALSE the user may may only choose one of the existing items..PPSee also isEditable()..SH "void QComboTableItem::setStringList ( const QStringList & l )\fC [virtual]\fR"Sets the list items of this QComboTableItem to the strings in the string list \fIl\fR..SH "QString QComboTableItem::text ( int i ) const"Returns the text of the combo's list item at index \fIi\fR..PPSee also currentText()..SH "SEE ALSO".BR http://doc.trolltech.com/qcombotableitem.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 (qcombotableitem.3qt) and the Qtversion (3.1.1).

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -