Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-45751

Can't emit signal with Android

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Not Evaluated
    • None
    • 5.4.1
    • None
    • Visual Studio 2013, Android SDK 19, Windows 8
    • Android

    Description

      Hi,

      I have a simple Slot,

      void sendImage(cv::Mat &imgMat, QImage &imgQImage);

      Project compiles on both Mingw and Visual Studio but when i try to build for Android, i get "error: no matching function for call to imageReader::sendImage(cv::Mat&, QImage)" error. (Signal emitting works as expected in Visual Studio/Mingw and no warning in stdout) I tried removing cv::Mat but nothing changed.

      Project compiles on both Mingw and Visual Studio but when i try to build for Android, i get "error: no matching function for call to imageReader::sendImage(cv::Mat&, QImage)" error.

      I tested my pro file on different project, try clean/run qmake/clean/rebuild, remove cv::Mat from signal but nothing worked.

      Here is my Slot

      #ifndef READERMANAGERQMLINTERFACE_H
      #define READERMANAGERQMLINTERFACE_H
      
      #include <QObject>
      #include <QDebug>
      
      #include "readermanager.h"
      class ReaderManagerQMLInterface : public QObject
      {
          Q_OBJECT
      public:
          explicit ReaderManagerQMLInterface(QObject *parent = 0);
          ~ReaderManagerQMLInterface();
      
          readerManager rManager;
        
      private:
      
      signals:
          void reqIm();
      
      public slots:
          void sendImage(QImage &imgQImage); //cv::mat removed
      };
      
      #endif // READERMANAGERQMLINTERFACE_H
      

      and signal;

      #ifndef IMAGEREADER_H
      #define IMAGEREADER_H
      
      #include <QObject>
      #include <QImage>
      #include <QDebug>
      #include <QThread>
      #include <QDir>
      #include <QFile>
      
      class imageReader : public QObject
          {
             Q_OBJECT
          public:
              explicit imageReader(QObject *parent = 0);
              ~imageReader();
              imgHelpers imHelpers;
      
          signals:
              void sendImage(QImage &imgQImage);//cv::mat removed
          public slots:
              void requestImage();
              void setFrame(int frameID);
              void loadImage(QString fileName);
          }
      

      I tried connecting these two with old and new syntax;

      QObject::connect(this->rManager.imreader, SIGNAL(sendImage(QImage&)), this, SLOT(sendImage(QImage&)) );
      
      connect(this->rManager.imreader, &imageReader::sendImage, this, &MainWindow::sendImage );
      

      Is it a moc related bug or am i missing something?

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            ogoffart Olivier Goffart (Woboq GmbH)
            bmeric Barış Meriç
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes