Nominate our 2022 Qt Champions!

[SOLVED]QSqlTableModel subclass

  • Hi
    I am developing a subclass from QSqlTableModel and would appreciate anyone who could tell me what type of object would be returned by calling internalPointer on a QModelIndex

    Thanks in advance

  • @GrahamL said:


    internalPointer store a pointer to the internal structure of the model; you could check the Qt sources to verify the exact type.

    Just to talk, why do you need to access to these data?

  • @mcosta
    I am just trying to gain a full understanding of the model view architecture
    I had an example that used a custom item model and that example uses internalPointer to get the underlying data

  • Hi,

    internalPointer() is basically used when you use createIndex().
    As I said the internal structure is not specified in the documentation; so if you want to understand the exact implementation you have to have a look in the Qt sources

Log in to reply