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. Known bug in Qt 5.5 with QProcess signals?
Forum Update on Monday, May 27th 2025

Known bug in Qt 5.5 with QProcess signals?

Scheduled Pinned Locked Moved General and Desktop
qt 5.5osx yosemiteqprocessshared libraryconnectsignal & slotsignals
2 Posts 1 Posters 1.4k 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.
  • M Offline
    M Offline
    maximo
    wrote on last edited by
    #1

    Is there like a known bug in Qt 5.5 with QProcess signals when used inside an external library? I mean, I can have my main GUI application receive the QProcess pointer and then use connect() from there, and the signals work fine. But when I try to make my library more self-contained and handle the signals inside the library like so:

    // note I have private: QProcess *goConsole in .h
    goConsole = new QProcess(); 
    goConsole->setEnvironment(QProcess::systemEnvironment());
    goConsole->setProcessChannelMode(QProcess::MergedChannels);
    goConsole->connect(goConsole,SIGNAL(readyReadStandardOutput()),this,SLOT(processRead()));
    goConsole->connect(goConsole,SIGNAL(finished()),this,SLOT(processFinished(int)));
    goConsole->start(sCommand);
    goConsole->waitForStarted();
    

    ...I get: no matching member for call to 'connect'

    M 1 Reply Last reply
    0
    • M maximo

      Is there like a known bug in Qt 5.5 with QProcess signals when used inside an external library? I mean, I can have my main GUI application receive the QProcess pointer and then use connect() from there, and the signals work fine. But when I try to make my library more self-contained and handle the signals inside the library like so:

      // note I have private: QProcess *goConsole in .h
      goConsole = new QProcess(); 
      goConsole->setEnvironment(QProcess::systemEnvironment());
      goConsole->setProcessChannelMode(QProcess::MergedChannels);
      goConsole->connect(goConsole,SIGNAL(readyReadStandardOutput()),this,SLOT(processRead()));
      goConsole->connect(goConsole,SIGNAL(finished()),this,SLOT(processFinished(int)));
      goConsole->start(sCommand);
      goConsole->waitForStarted();
      

      ...I get: no matching member for call to 'connect'

      M Offline
      M Offline
      maximo
      wrote on last edited by
      #2

      I figured it out. I needed to set my QObject and QCore stuff properly. In the .pro file of the shared library, I added:

      QT += core
      

      In the shared library's .h file, I switched this:

      class CTSCANSHARED_EXPORT ctScan
      {
      public:
      ...blah blah...
      

      with this:

      class CTSCANSHARED_EXPORT ctScan: public QObject
      {
          Q_OBJECT
      public:
      ...blah blah...
      

      And then ensured the shared library's .h file had this:

      #include <QObject>
      

      And then it compiled properly.

      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