Results 1 to 3 of 3

Thread: QIcon clicked signal

  1. #1
    Join Date
    Jul 2014
    Posts
    5
    Qt products
    Qt5
    Platforms
    Windows

    Default QIcon clicked signal

    I'm using QIcon decorators in my QTableView cells and I would like to receive an event when the user clicks the icon. Is there any way to get a mouse click signal from a QIcon, or do I have to try to work it out from the QTableView clicked signal?

    Thanks,

    Aaron Stibich

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: QIcon clicked signal

    QIcon is a value class, it is not a QObject derived class. Only QObject derived class have signals.

    A quick look into the documentation would have told you that as well.

    Cheers,
    _

  3. #3
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: QIcon clicked signal

    Do you want something different to happen when the user clicks the icon as opposed to someplace else in the cell? You should probably create a custom QStyledItemDelegate for those cells and handle the clicks in the editor widget you create.

Similar Threads

  1. clicked() signal for QLineEdit
    By smarinr in forum Qt Programming
    Replies: 10
    Last Post: 26th June 2019, 17:35
  2. QTextEdit and URL clicked signal
    By Pablik in forum Qt Programming
    Replies: 6
    Last Post: 24th June 2012, 21:06
  3. signal mapping on pushbutton signal clicked
    By wagmare in forum Qt Programming
    Replies: 2
    Last Post: 17th March 2009, 08:54
  4. QListWidget clicked signal
    By asieriko in forum Qt Programming
    Replies: 12
    Last Post: 10th August 2007, 16:37
  5. Replies: 2
    Last Post: 31st May 2006, 22:52

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.