Results 1 to 6 of 6

Thread: How to focus on QTableView Item

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2011
    Posts
    45
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    4

    Default How to focus on QTableView Item

    hi,
    hope u can help:
    i have QTableView *tableview and i insert a row to it by
    Qt Code:
    1. tableview->model()->insertRow(0);
    To copy to clipboard, switch view to plain text mode 
    Whereby the model is a custom model subclassed from QAbstractTableModel.
    Insertion works fine and one can edit the row-content by double-clicking on the freshly created row.

    Now, i want the inserted row (this is editable) to get the edit-focus immediately without having to double-click on it to edit it).
    how do i do that?
    thnx.

  2. #2
    Join Date
    Feb 2011
    Location
    Latvia
    Posts
    139
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    24
    Thanked 6 Times in 6 Posts

    Default Re: How to focus on QTableView Item

    I have no idea if this will work, but the first thing i would try - emit the signal item doubleclicked...
    Again - I don't know if this will work...

Similar Threads

  1. QTableView Edit Focus
    By waynew in forum Qt Programming
    Replies: 2
    Last Post: 16th August 2010, 13:24
  2. focus on a Item
    By peace_comp in forum Qt Programming
    Replies: 1
    Last Post: 6th July 2008, 18:52
  3. default on focus different item in messagebox?
    By gfunk in forum Qt Programming
    Replies: 1
    Last Post: 26th October 2007, 06:54
  4. QGraphicsView and item focus
    By Micawber in forum Qt Programming
    Replies: 3
    Last Post: 22nd June 2007, 21:36
  5. Replies: 3
    Last Post: 7th November 2006, 09:35

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
  •  
Qt is a trademark of The Qt Company.