Results 1 to 2 of 2

Thread: How to set focus to QTableWidget's cellWidget

  1. #1
    Join Date
    Dec 2010
    Posts
    4
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default How to set focus to QTableWidget's cellWidget

    I use QTableWidget to manage my custom widget. When i double click on the table row, i create new row then span the whole row into 1 column and then i use setCellWidget to insert my custom widget.

    My issue is, when i press or hold the TAB key the cellWidget do not get focus. I try to use setFoucus() and clearFocus on the tableWidget but nothing, i also try to change focusPolicy-s but nothing. The TAB key allways change between QTableWidget rows and when the selection arrive to the cellWidget it is simple skip it.

    It is possible to manage focus inside cellWidget?

  2. #2
    Join Date
    Dec 2010
    Posts
    4
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How to set focus to QTableWidget's cellWidget

    I found the solution. I disabled the tabKeyNavigation property at tableWidget.

Similar Threads

  1. change color/focus in qtablewidget
    By mmm286 in forum Newbie
    Replies: 7
    Last Post: 5th June 2013, 03:58
  2. QtableWidget moving cellWidget
    By hubipet in forum Qt Programming
    Replies: 0
    Last Post: 22nd October 2010, 07:06
  3. Removing Focus from QTableWidget
    By kapoorsudhish in forum Newbie
    Replies: 2
    Last Post: 22nd October 2009, 14:16
  4. QTableWidget & cellWidget : some pointers
    By prashant in forum Qt Programming
    Replies: 1
    Last Post: 18th October 2009, 10:48
  5. Focus of cells in a QTableWidget
    By SailinShoes in forum Qt Programming
    Replies: 4
    Last Post: 9th June 2008, 08:19

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.