Results 1 to 20 of 22

Thread: Object::connect: No such slot MainWindowImpl::rowClicked(QModelindex)

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Dec 2007
    Location
    Groningen Netherlands
    Posts
    182
    Thanks
    16
    Thanked 2 Times in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Object::connect: No such slot MainWindowImpl::rowClicked(QModelindex)

    New to qt, using qdevelop.

    For a few days now I'm trying get an event working when a row is clicked in a tableview.
    I think I have all the syntax right but the event is still not firing and I'm getting out of options.

    In Mainwindow.ui, a signal / slot pair exists that connects the table pressed(QModelIndex) to the MainWindow.

    <sender>table</sender>
    <signal>pressed(QModelIndex)</signal>
    <receiver>MainWindow</receiver>
    <slot></slot>


    Then I have this code, in mainwindowimpl.h

    private slots:
    void rowClicked(const QModelIndex &);

    and in mainwindowimp.cpp:
    in constructor:

    connect(table, SIGNAL(pressed(const QModelIndex &)), this, SLOT(rowClicked(const QModelindex &)));

    member function:

    void MainWindowImpl::rowClicked(const QModelIndex &index)
    {
    int row = index.row();
    QString name = model->record(row).value("name").toString();
    setWindowTitle(name);
    }

    That event does not get called, why not? Voodoo?
    Help is appreciated.
    Last edited by JeanC; 3rd January 2008 at 15:14.

Similar Threads

  1. How to declare SLOT as a parameter to member function?
    By QPlace in forum Qt Programming
    Replies: 2
    Last Post: 17th July 2018, 00:41
  2. Replies: 2
    Last Post: 8th October 2007, 15:02
  3. Signal / Slot with specific argument and threads
    By tpf80 in forum Qt Programming
    Replies: 3
    Last Post: 14th September 2007, 23:43
  4. Example HowTo create custom view
    By dexjam in forum Newbie
    Replies: 6
    Last Post: 12th July 2006, 11:06
  5. signal slot conection using a string, not a SLOT
    By rianquinn in forum Qt Programming
    Replies: 6
    Last Post: 5th February 2006, 18: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
  •  
Qt is a trademark of The Qt Company.