Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Regarding the deletion of custom widget used in createEditor() of QSqlRelationalDelegate

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

Scheduled Pinned Locked Moved Unsolved General and Desktop
qtableviewqsqlrelationaltqsqlrelational
2 Posts 2 Posters 851 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Sudo007
    wrote on 17 Aug 2016, 06:49 last edited by
    #1

    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.

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mrjj
      Lifetime Qt Champion
      wrote on 17 Aug 2016, 06:59 last edited by
      #2

      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.

      1 Reply Last reply
      0

      1/2

      17 Aug 2016, 06:49

      • Login

      • Login or register to search.
      1 out of 2
      • First post
        1/2
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved