Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. No such slot (but it does exist)
Forum Updated to NodeBB v4.3 + New Features

No such slot (but it does exist)

Scheduled Pinned Locked Moved General and Desktop
4 Posts 3 Posters 998 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    EverydayDiesel
    wrote on last edited by EverydayDiesel
    #1
    This post is deleted!
    1 Reply Last reply
    0
    • M Offline
      M Offline
      mcosta
      wrote on last edited by
      #2

      @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 );   
      
      ....
      };
      

      Once your problem is solved don't forget to:

      • Mark the thread as SOLVED using the Topic Tool menu
      • Vote up the answer(s) that helped you to solve the issue

      You can embed images using (http://imgur.com/) or (http://postimage.org/)

      1 Reply Last reply
      0
      • R Offline
        R Offline
        Rondog
        wrote on last edited by
        #3

        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;
        };
        
        1 Reply Last reply
        0
        • E Offline
          E Offline
          EverydayDiesel
          wrote on last edited by
          #4

          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!

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved