Qt: QAbstractItemModel and 'const' -


I am trying to use QTreeView for the first time with QAbstractItemModel and instantly have a problem. QAbstractItemModel declares the interface methods to be const , assuming that they will not change the data but I want the result of a SQL query, and return the data for a record with the specified index QSqlQuery :: Using the seek () which is non-present, there are 'official' guidelines for using QAbstractItemModel with any item, to get the number of items, item per item, etc. to Can be Tit? Or should I hack C ++ with Cast Cast?

You get a pointer for QSqlQuery; Your pointer will not change, only the value that you point to, therefore operation will still be considered "const".


Comments