The following class members are part of the Qt 3 support layer. They are provided to help you port old code to Qt 4. We advise against using them in new code.
QString | toString ( const QString & prefix = QString(), const QString & sep = QLatin1String( "," ), bool verbose = true ) const |
QStringList | toStringList ( const QString & prefix = QString(), bool verbose = true ) const |
Returns a comma-separated list of all the index's field names as a string. This string is suitable, for example, for generating a SQL SELECT statement. Only generated fields are included in the list (see isGenerated()). If a prefix is specified, e.g. a table name, it is prepended before all field names in the form:
"prefix.<fieldname>"
If sep is specified, each field is separated by sep. If verbose is true (the default), each field contains a suffix indicating an ASCending or DESCending sort order.
Returns a list of all the index's field names. Only generated fields are included in the list (see isGenerated()). If a prefix is specified, e.g. a table name, all fields are prefixed in the form:
"prefix.<fieldname>"
If verbose is true (the default), each field contains a suffix indicating an ASCending or DESCending sort order.
Note that if you want to iterate over the list, you should iterate over a copy, e.g.
QStringList list = myIndex.toStringList(); QStringList::Iterator it = list.begin(); while(it != list.end()) { myProcessing(*it); ++it; }
© 2008-2011 Nokia Corporation and/or its subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation in Finland and/or other countries worldwide.
All other trademarks are property of their respective owners. Privacy Policy
Licensees holding valid Qt Commercial licenses may use this document in accordance with the Qt Commercial License Agreement provided with the Software or, alternatively, in accordance with the terms contained in a written agreement between you and Nokia.
Alternatively, this document may be used under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.