Regarding the deletion of custom widget used in createEditor() of QSqlRelationalDelegate



  • I have created a Qt Application using Qt 4.8.I am using custom widgets in the delegate , which is set to the QTableView. The model is of type QSqlRelationalTableModel , which gets data from sqlite database. I have created 7 custom widgtes outside the delegate class and reusing them in the createEditor() . When i scroll to next page , the custom widgets gets deleted , even though it's created outside of the delegate class.
    Those custom widgets must not be deleted.
    Could you guide me to fix the issue.


  • Qt Champions 2016

    Hi
    Did you have a look at
    http://doc.qt.io/qt-4.8/qitemeditorfactory.html#details

    Seems to be such editor cache, like you have/want.



Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.