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. QTreeView item editor: how to make it only commit the edit on Enter press?

QTreeView item editor: how to make it only commit the edit on Enter press?

Scheduled Pinned Locked Moved General and Desktop
3 Posts 1 Posters 1.1k 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.
  • V Offline
    V Offline
    Violet Giraffe
    wrote on last edited by
    #1

    As you may or may not know, by default the editor commits the data on Enter press or focus change. I need to discard edits on focus change, not commit. How do I do that? I already have my own delegate class, can I do it with its help?

    1 Reply Last reply
    0
    • V Offline
      V Offline
      Violet Giraffe
      wrote on last edited by
      #2

      I guess one way to install event filter for the editor, but it's clumsy.

      1 Reply Last reply
      0
      • V Offline
        V Offline
        Violet Giraffe
        wrote on last edited by
        #3

        Actually, scratch that, I can't think of a way to solve my problem by using event filter either.

        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