Hi all,

I want to use multi-relation in a QTableView to follow more than only 1 relation. Do you know if is it possible ?


Let me explain with an example :

There are 3 Table : User - Town and Country like this :

Qt Code:
  1. ------------------ ------------------ ------------------
  2. | USER | | TOWN | | COUNTRY |
  3. ------------------ ------------------ ------------------
  4. | user_id | |-->| town_ID | |-->| Country_id |
  5. | Name | | | Name | | | Name |
  6. | town_link |---| | Country_link |---| | |
  7. | | | | | |
  8. ------------------ ------------------ ------------------
To copy to clipboard, switch view to plain text mode 

And this is that i want to display in my QTableView using a QSqlRelationalTableModel :

Qt Code:
  1. ---------------------------------------------------
  2. | USER | TOWN | COUNTRY |
  3. ---------------------------------------------------
  4. | john | Londres | Angleterre |
  5. | paul | Lyon | France |
  6. | truc | Paris | France |
  7. | pierre | Lausane | Suisse |
  8. | jasmin | Oslo | Norvège |
  9. | dan | Cupertino | USA |
  10. ---------------------------------------------------
To copy to clipboard, switch view to plain text mode 

Is it possible to do that only with QTableView and QSql(Relational)TableModel ?

Thanks

jjay