|Subject:||[Qt-interest] QSqlRelation and order of items in combo box|
|Date:||Fri, 23 Apr 2010 10:46:56 +0300|
When using an QSqlRelation, is there a way to specify the order of the items in the detail table?
If I have
QSqlRelationalTableModel *mMdl = new QSqlRelationalTableModel(this);
mMdl->setRelation(master_fld1, QSqlRelation("detailTbl", "id", "descr"));
I get a combo box in ui->tblView (which is a QTableView) for the field master_fld1.
However, I would like to change the sort order of the items, as it is currently undefined (there is no ORDER BY section in the SQL that is sent to the server for detailTbl).
Can I either specify somehow an ORDER BY for QSqlRelation, or change the sort order of the items in the combo box?
_______________________________________________ Qt-interest mailing list Qt-interest@xxxxxxxxxxxxx http://lists.trolltech.com/mailman/listinfo/qt-interest
|<Prev in Thread]||Current Thread||[Next in Thread>|
|Previous by Date:||Re: [Qt-interest] QSqlRelation and order of items in combo box, Harry Sfougaris|
|Next by Date:||Re: [Qt-interest] redistribute QT application for Windows, David Ching|
|Previous by Thread:||[Qt-interest] how to prevent html page rendering in QwebKit, Meir Yanovich|
|Next by Thread:||Re: [Qt-interest] QSqlRelation and order of items in combo box, Jan|
|Indexes:||[Date] [Thread] [Top] [All Lists]|