Results 1 to 3 of 3

Thread: QTableWidget question

  1. #1
    Join Date
    Jun 2006
    Location
    San Jose, CA
    Posts
    53
    Thanks
    4
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default QTableWidget question

    Hi,

    I have a table using a QTableWidget and defined a slot on_tableWidget_cellClicked(). The idea is if I click on a certain cell an editor window opens. Now when I navigate the table with the keyboard I like to press enter on the cell and get the same result. I can't find a signal which allows me to do that.
    Any hints?
    Thanks a lot.

  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: QTableWidget question

    So the editing is done in a separate window? You know, the items could be editable in place too..
    Anyway, there's no such signal, but you can override keyPressEvent() (or install an event filter) to catch the enter press.
    J-P Nurmi

  3. #3
    Join Date
    Jun 2006
    Location
    San Jose, CA
    Posts
    53
    Thanks
    4
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QTableWidget question

    it's kind of a spreadsheet where you have a nice big editor window to write your equations. The cell just displays the evaluated value.

    Anyway, thanks for the hint I was afraid I had to do it the hard way.
    Thanks.

Similar Threads

  1. parsing QtableWidget from a QStackedWidget
    By rosmarcha in forum Qt Programming
    Replies: 10
    Last Post: 13th October 2006, 14:36
  2. QTableWidget editing question
    By Trasmeister in forum Qt Programming
    Replies: 1
    Last Post: 20th September 2006, 18:46
  3. QTableWidget Update - slow
    By DPinLV in forum Qt Programming
    Replies: 16
    Last Post: 18th August 2006, 21:09
  4. Replies: 6
    Last Post: 5th March 2006, 21:05
  5. Updating a QTableWidget through a Dialog
    By dragon in forum Newbie
    Replies: 3
    Last Post: 19th January 2006, 21:16

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.