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. Strange behaviour of QStyledItemDelegate
Forum Updated to NodeBB v4.3 + New Features

Strange behaviour of QStyledItemDelegate

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 447 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.
  • Y Offline
    Y Offline
    yura-vel
    wrote on last edited by
    #1

    First of all I should say that I do not use moc in my project, so can't to use signal and slots.

    To use QComboBox behaviour in the QTableWidget I implemented a custom delegate. It works fine except one bizarre behaviour: if changed the value in the last column in the table, after hiding the widget (combobox), the selection in the table switches to the next row. The same delegate works fine in the one of middle column (the selection is not changed).

    The reason of changing selection in the table, is invoking hide() for the combobox showed by the delegate. because after invoking this method, the signal QTableWidget::itemSelectionChanged is emitted.

    Tell me please: why hide() leads to switching selection?

    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