Results 1 to 2 of 2

Thread: QTableView and Editor

  1. #1
    Join Date
    Jan 2011
    Posts
    17
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Windows Symbian S60

    Default QTableView and Editor

    Hi!
    I have a TableView with one column that is handled by a combobox delegate. After choosing option in combobox it stays in editor mode, so when user clicks from menu "File"->"Save as csv" the chosen value is not yet in model, and it is not saved to file. How can I close editor when I do not know in which cell it is opened?

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: QTableView and Editor

    Calling setFocus() on a widget other than the table view should do it.

Similar Threads

  1. QTableView overwriting the editor with update
    By thePoet in forum Qt Programming
    Replies: 3
    Last Post: 15th July 2010, 22:10
  2. Replies: 1
    Last Post: 29th April 2010, 05:21
  3. Replies: 0
    Last Post: 2nd March 2010, 18:06
  4. How to Add Text to Editor in QTableView
    By klahey in forum Qt Programming
    Replies: 2
    Last Post: 2nd January 2010, 15:05
  5. Replies: 1
    Last Post: 18th September 2009, 20:18

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.