Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-17901

QSqlRelation update

    XMLWordPrintable

Details

    Description

      I don't know if There is an error or I can't find the correct solution, I will try to explain:

      I have a QSqlRelationalTableModel with a QSqlRelation set, and a QSqlRelationalDelegate set in the correspondent view. When I add a register in the foreign table, I don't know how to update this relation, I always see the old values in the QSqlRelationalDelegate's combo box. I've tried the select() and reset() methods of the model, and re-set the relation. None of them work.

      I think there is not QTableView's fault because it is created every time I want view the model. i.e., the program have to destroy it (and QSqlRelationalDelegate) every time I want to add a register in the foreign table, because it is the centralWidget of a QMainWindow.

      Please excuse my limited English, corrections are welcome.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            earthdomain Earth Domain (Inactive)
            maybeineedholidays Eugenio PĂ©rez
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 5 minutes
                5m
                Remaining:
                Remaining Estimate - 5 minutes
                5m
                Logged:
                Time Spent - Not Specified
                Not Specified

                Gerrit Reviews

                  There are no open Gerrit changes