Results 1 to 2 of 2

Thread: Deselect text on a QTableWidgtem cell upon double clicking

  1. #1
    Join Date
    Jan 2009
    Posts
    6
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Question Deselect text on a QTableWidgtem cell upon double clicking

    Everytime I double click a cell that belongs to a QTableWidget the cell's entire text is selected. I have tried to disable this so that when I double a cell the text editor opens up for editing with NO text selected, but I haven't been successful. This is apparently the default behavior. How can i change this?

    I'm using Qt-4.6.0 on Linux.

    Thanks!

  2. #2
    Join Date
    Jan 2009
    Posts
    6
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Deselect text on a QTableWidgtem cell upon double clicking

    I finally figured out how to do this. I did it by capturing the Qt::FocusIn event on the delegate's eventFilter() function. There I used the pointer to the editor to call the deselect() function.

Similar Threads

  1. Double Clicking Pro File
    By BalaQT in forum Installation and Deployment
    Replies: 2
    Last Post: 18th November 2009, 05:23
  2. Different text styles in a single cell of QTableView?
    By xfurrier in forum Qt Programming
    Replies: 2
    Last Post: 23rd August 2009, 06:49
  3. QListView icon double clicking
    By been_1990 in forum Qt Programming
    Replies: 8
    Last Post: 28th April 2009, 20:05
  4. Double clicking with QTableView
    By DPinLV in forum Qt Programming
    Replies: 2
    Last Post: 13th September 2006, 06:22
  5. Replies: 1
    Last Post: 17th May 2006, 00: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.