No such slot (but it does exist)



  • This post is deleted!


  • @EverydayDiesel said:

    parseNetworkResponse

    that function is declared in the public part of the class; you need to declare as slot (at least if you want to use the OLD connect syntax)

    class Mainindow: public QMAinWindow
    {
    Q_OBJECT
    
    public:
    ....
    
    public Q_SLOTS:
        void parseNetworkResponse( QNetworkReply *finished );   
    
    ....
    };
    


  • The error is correct. The 'slot' parseNetworkResponse(...) is under the section 'public'. It should be under 'private slots' or 'slots'.

    class MainWindow : public QMainWindow
    {
    Q_OBJECT
    
    public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();
    // void parseNetworkResponse( QNetworkReply *finished );
    
    private slots:
    void on_cmdGetConnection_clicked();
    void parseNetworkResponse( QNetworkReply *finished );
    
    private:
    Ui::MainWindow *ui;
    QNetworkAccessManager m_nam;
    };
    


  • Thanks, shortly after posting i realized that the slot was not defined in public slots: in the header.

    That still does not solve "GDB: Failed to set controlling terminal: Inappropriate ioctl for device" but it does compile

    Thanks everyone!


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.