Results 1 to 3 of 3

Thread: QTable, Removing cell focus

  1. #1
    Join Date
    Jul 2007
    Posts
    8
    Qt products
    Qt3
    Platforms
    Unix/X11

    Question QTable, Removing cell focus

    Hi all,

    I have QTableWidget class, it can be hold 10 rows and 3 columns before scrollbar appear,
    for example it has 2 rows and 3 columns ,
    is there a way to removing cell focus when clicked on the empty space below the two rows,
    because focus will be move to the last row (mark by rectangle), but normal when clicked existing cell.

    thanks in advance.

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: QTable, Removing cell focus

    I'm not sure how badly this would break the mouse handling but you could try catching mouse press event and calling the base class implementation only if pressed over an item, otherwise ignoring the event and setting current item to 0.

    Reference:
    J-P Nurmi

  3. #3
    Join Date
    Jul 2007
    Posts
    8
    Qt products
    Qt3
    Platforms
    Unix/X11

    Default Re: QTable, Removing cell focus

    Hi, thanks, i will try this.

Similar Threads

  1. Highlighting a cell in QTable
    By sumsin in forum Qt Programming
    Replies: 1
    Last Post: 18th April 2007, 06:28
  2. word wrapping in QTable Cell
    By joseph in forum General Discussion
    Replies: 0
    Last Post: 27th November 2006, 09:30
  3. Replies: 3
    Last Post: 8th September 2006, 18:54
  4. QTable - Cell Thickness
    By Solarity in forum Newbie
    Replies: 4
    Last Post: 16th March 2006, 19:15
  5. Qtable and Cell overflow
    By taylor34 in forum Qt Programming
    Replies: 1
    Last Post: 23rd February 2006, 09:23

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.