Results 1 to 1 of 1

Thread: Activate QTableWidget cell

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

    Default Activate QTableWidget cell

    I created a widget, which has a QTableWidget in it. That QTableWidget has 2 rows and 7 columns. When the app is loaded I need to activate a specific cell (say 2-nd row, 3-rd column). How can I activate it? I tried:
    Qt Code:
    1. emit this->weekCalendar->cellClicked(1, 2);
    To copy to clipboard, switch view to plain text mode 
    But I get an error:
    Qt Code:
    1. 'void QTableWidget::cellClicked(int, int)' is protected
    To copy to clipboard, switch view to plain text mode 

    Is there any other way to select a cell?

    NVM, Solved this using setCurrentCell, sorz for disturbance.
    Last edited by Archa4; 9th May 2011 at 08:56. Reason: SOLVED!

Similar Threads

  1. Replies: 5
    Last Post: 26th October 2014, 13:56
  2. Getting Cell Content of QTableWidget
    By Kclark in forum Qt Programming
    Replies: 1
    Last Post: 27th December 2010, 14:30
  3. qtablewidget cell's x() , y()
    By BalaQT in forum Qt Programming
    Replies: 1
    Last Post: 7th December 2010, 13:23
  4. Can QPushButton be put into a QTableWidget cell?
    By ShaChris23 in forum Newbie
    Replies: 4
    Last Post: 1st September 2010, 01:18
  5. Replies: 1
    Last Post: 7th December 2009, 19:56

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.