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

cannot set Qt::BackgroundRole using QSqlTableModel::setData()

    XMLWordPrintable

Details

    Description

      QSqlTableModel::setData() rejects all roles other than Qt::EditRole, so that we cannot set Qt::BackgroundRole using QSqlTableModel::setData() , please add relevant description in the doc or change the code, the current behavior halts many users , e.g.

      https://forum.qt.io/topic/30289/setdata-in-qsqltablemodel-with-role-other-than-qt-editrole-does-not-work

      https://forum.qt.io/topic/85973/how-to-simply-change-the-background-colour-of-a-cell-inside-a-tableview/6

       

      Attachments

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

        Activity

          People

            andysh Andy Shaw
            philip Philip Lee
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes