Results 1 to 3 of 3

Thread: clicked signal on qtableview does not exist?

  1. #1
    Join Date
    Apr 2010
    Location
    Denmark
    Posts
    3
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Question clicked signal on qtableview does not exist?

    I am trying to connect to the signal clicked (and pressed), but it cannot find any of them. I have been looking in the doc and it states that both signals exist. Does anyone know why it says that the signals do not exist when I try?

    Thanks in advance
    Jess


    QTableView *tableViewAvailStops;
    connect(tableViewAvailStops, SIGNAL(pressed(QModelIndex())), this, SLOT(clickedAvailableStop()));
    Object::connect: No such signal QTableView:ressed(QModelIndex())
    Object::connect: (sender name: 'tableViewAvailStops')
    ...

    QTableView *tableViewAvailStops;
    connect(tableViewAvailStops, SIGNAL(clicked(QModelIndex())), this, SLOT(clickedAvailableStop()));
    Object::connect: No such signal QTableView::clicked(QModelIndex())
    Object::connect: (sender name: 'tableViewAvailStops')
    ...
    Jess Nielsen
    Technical Architect

  2. #2
    Join Date
    Apr 2010
    Location
    Denmark
    Posts
    3
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Re: clicked signal on qtableview does not exist?

    I have solved this on my own...


    connect(tableViewAvailStops, SIGNAL(clicked(QModelIndex)), this, SLOT(clickedAvailableStop()));
    Jess Nielsen
    Technical Architect

  3. #3
    Join Date
    Jun 2010
    Location
    India
    Posts
    50
    Thanks
    1
    Thanked 15 Times in 14 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: clicked signal on qtableview does not exist?

    Note that your function signatures are different

    clicked(QModelIndex); 1 arg
    clickedAvailableStop(); No Arg

    The above code might not work sometimes.

Similar Threads

  1. clicked() signal for QLineEdit
    By smarinr in forum Qt Programming
    Replies: 10
    Last Post: 26th June 2019, 16:35
  2. QTreeWidget clicked signal
    By ^NyAw^ in forum Qt Programming
    Replies: 41
    Last Post: 30th January 2010, 11:42
  3. signal mapping on pushbutton signal clicked
    By wagmare in forum Qt Programming
    Replies: 2
    Last Post: 17th March 2009, 07:54
  4. disable clicked() signal
    By mattia in forum Newbie
    Replies: 2
    Last Post: 27th February 2008, 10:27
  5. QListWidget clicked signal
    By asieriko in forum Qt Programming
    Replies: 12
    Last Post: 10th August 2007, 15:37

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.