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- Problems comunicating Arduino and Qt

No such slot- Problems comunicating Arduino and Qt

Scheduled Pinned Locked Moved General and Desktop
7 Posts 3 Posters 1.9k Views
  • 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.
  • J Offline
    J Offline
    josetomas
    wrote on last edited by
    #1

    Hi!
    Im trying to comunicate an Arduino with Qt Creator throw the Serial Port.

    The result gives the following error:
    QObject::connect: No such slot MainWindow::serialRecieved() in ..\wakwaka\mainwindow.cpp:23
    QObject::connect: (receiver name: 'MainWindow')
    Thanks for your help

    1 Reply Last reply
    0
    • J Offline
      J Offline
      josetomas
      wrote on last edited by
      #2

      Cant post the code, I receive an error that sais it can be SPAM.
      But I took it from thise tutorial:
      https://www.youtube.com/watch?v=UD78xyKbrfk

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi and welcome to devnet,

        Are you sure you declared a slot with that name in your MainWindow class definition ?

        Something like:
        @
        public slots:
        void serialReceived();
        @

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0
        • J Offline
          J Offline
          josetomas
          wrote on last edited by
          #4

          I declared it as a private slot
          @private slots:
          void serialReceived();@

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #5

            Did you implement it ?

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            0
            • J Offline
              J Offline
              josetomas
              wrote on last edited by
              #6

              yes
              @ connect(serial,SIGNAL(readyRead()),this,SLOT(serialRecieved()));@
              that calls:
              @void MainWindow::serialReceived()
              {
              QByteArray ba;
              ba=serial->readAll();
              ui->label->setText(ba);
              qDebug()<<ba;
              }
              @

              1 Reply Last reply
              0
              • Chris KawaC Offline
                Chris KawaC Offline
                Chris Kawa
                Lifetime Qt Champion
                wrote on last edited by
                #7

                Possibly a typo? You've got "serialRecieved" in the connect call and "serialReceived" as the member name.

                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