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 close/commit cell when using own delegate
Forum Updated to NodeBB v4.3 + New Features

QTableView close/commit cell when using own delegate

Scheduled Pinned Locked Moved Solved General and Desktop
2 Posts 1 Posters 459 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.
  • thompsonxT Offline
    thompsonxT Offline
    thompsonx
    wrote on last edited by
    #1

    Hi all,
    I have a standard QTableView and inside one column I use own delegate which uses a special widget as the editor. The special widget consists of a QLabel and a QPushButton which opens a dialog for file choosing. After one selects a file, a path to this file is displayed by the QLabel. The path is saved to a corresponding cell after I press enter key or if I click to a different cell. Is there any possibility to save the path to the cell immediately after a user chooses a file in the file dialog? In other words, I would like to get rid of necessity to press enter or clicking to a different cell.

    Thanks.

    1 Reply Last reply
    0
    • thompsonxT Offline
      thompsonxT Offline
      thompsonx
      wrote on last edited by
      #2

      Solved. The special widget sends a signal when a file is chosen. The signal is caught by the delegate which commits the changes - QAbstractItemDelegate::commitData(...).

      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