Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

QSqlRelationalTableModel & Sample Values



  • Hello everyone! Khm, here I am Sqlite database (there is part we are interested in):
    !http://pastexen.com/i/Yk9KGB93.png(Part of base in Toad Data Modeler)!
    I'm using in my project QSqlRelationTableModel - Qt Sql model-interview. So, for example I'm opened table StoringItems and set up relations with metod QSqlRelationTableModel::setRelation(). Ok, but problem is that if I will change (see example) GeForce to Intel Core its type (sory its on russian, on screnshot there are two types: Videocards and Processors) will not change on type Processor from Videocards because that information is in another table. It is my question and problem: How can I set up such relations in QSqlRelationTableModel? Or I can't and I need to change QSqlRelationTableModel to level below and use queries.
    !http://pastexen.com/i/8aE6ESW2.png(Example)!
    P.S. And one more thing, how can I configure model that when you click on the field with the date opened calendar to choosing? Only with catching events?


Log in to reply