Results 1 to 2 of 2

Thread: Detect click on QTableWidget label

  1. #1
    Join Date
    Jan 2010
    Posts
    7
    Qt products
    Qt4
    Platforms
    Windows

    Default Detect click on QTableWidget label

    The slot CellClick work only for cell, not for the orizontal or vertical lable. Is possible to detect the click on labes? thanks!

    Sam

  2. #2
    Join Date
    Jan 2010
    Posts
    7
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Detect click on QTableWidget label

    Ok, I didn't explain well!

    I want to detect mouse click on the header (horizontal) of the table, if someone is searching this i found the way:


    connect(ui->Table->horizontalHeader(), SIGNAL(sectionClicked(int)), SLOT(Table_HeaderClick(int)));

    and implement the method Table_HeaderClick() as a slot.
    Is not possible set this function direclty with the designer of QTCreator.

Similar Threads

  1. how to detect mouse click on qwtPlot?
    By rambo83 in forum Qwt
    Replies: 7
    Last Post: 18th December 2013, 05:04
  2. Replies: 6
    Last Post: 5th June 2009, 09:38
  3. QTableWidget right click menu
    By stefan in forum Newbie
    Replies: 5
    Last Post: 23rd June 2008, 19:42
  4. close window when click on a label
    By sabeesh in forum Qt Programming
    Replies: 3
    Last Post: 29th October 2007, 07:35
  5. QTableWidget click in empty space results in error?
    By Giel Peters in forum Qt Programming
    Replies: 4
    Last Post: 21st January 2006, 00:07

Tags for this Thread

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.