View Full Version : Multiple model to single view
moh.gup@gmail.com
5th March 2012, 18:02
Hi,
Is is possible to have multiple modl attched to single view.
If yes,Please suggest how?
Thanks
wysota
5th March 2012, 19:55
Yes. Use QAbstractItemView::setModel() multiple times with different views and same model.
ChrisW67
6th March 2012, 03:54
I suspect the OP means "at the same time". That is, the single view is showing some data from model A, and some from model B at the same time.
The general answer would be no in this case (at least with respect to the standard views supplied). If the two models were of two related tables in a database then the QSqlRelationalTableModel is a good place to look for alternative approaches.
wysota
6th March 2012, 09:48
Hmm... I must have been too tired when reading this thread :)
moh.gup@gmail.com
9th March 2012, 09:57
Thanks for your reply
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.