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. QTableView + QStyledItemDelegate + QPushButton editor + openPersistentEditor problem
Forum Updated to NodeBB v4.3 + New Features

QTableView + QStyledItemDelegate + QPushButton editor + openPersistentEditor problem

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 1.6k Views 1 Watching
  • 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.
  • napajejenunedk0N Offline
    napajejenunedk0N Offline
    napajejenunedk0
    wrote on last edited by
    #1
    1. Create a QTableView.
    2. Subclass QStyledItemDelegate and output a QPushButton in its createEditor member function.
    3. Reimplement the setModelData function and put a qDebug() statement to see how the delegate manages the button clicks and the model modification.
    4. Create an instance of the delegate and set it to the view.
    5. Open persistent editor in one of the cells.

    When the button is hit, the setModelData reimplemented member function does not get called immediately after the click of the button, but if one clicks outside all table cells - in the empty part of the table area, then it is called and the model is notified.

    Suggestions what should be done to fix this lazy notification effect?

    1 Reply Last reply
    0

    • Login

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