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. Solved - no matching function for call to 'MainWindow::connect(

Solved - no matching function for call to 'MainWindow::connect(

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

    Hello,

    I have one of those "no matching function for call to 'MainWindow::connect( ..." errors and I'm not seeing the problem. A code snippit shoing the connect function calls is below. If anyone can help, I'd appreciate it. What exactly is causing the error here?

    Thanks.

    @
    // QT MainWindow class
    class MainWindow : public QMainWindow
    {
    Q_OBJECT

    public:

    N8241A* n8241a;
    DINIBOARD* diniboard;
    ASIC* asic;
    
    Ui::MainWindow* accessgui() { return ui; }
    
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();
    

    private:
    void initialize()
    {
    n8241a = new N8241A(ui);
    diniboard = new DINIBOARD(ui);
    asic = new ASIC(ui, diniboard);

        // form signal-slot connections to GuI text edit box
        QObject::connect(n8241a, SIGNAL(appendPlainText ( const QString &)), ui->ASIC_TestStatusTextBox, SLOT(appendPlainText ( const QString &)));
        QObject::connect(diniboard, SIGNAL(appendPlainText ( const QString &)), ui->ASIC_TestStatusTextBox, SLOT(appendPlainText ( const QString &)));
        QObject::connect(asic, SIGNAL(appendPlainText( const QString &)), ui->ASIC_TestStatusTextBox, SLOT(appendPlainText ( const QString &)));
    
    }@
    

    [edit, code tags added, koahnig]

    1 Reply Last reply
    0
    • S Offline
      S Offline
      sprl111
      wrote on last edited by
      #2

      Nevermind. I failed to make QObject parent classes.

      1 Reply Last reply
      0
      • M Offline
        M Offline
        mlong
        wrote on last edited by
        #3

        Glad you figured out your problem! Be sure and edit your initial post to add [Solved] to the title. Thanks!

        Software Engineer
        My views and opinions do not necessarily reflect those of anyone -- living or dead, real or fictional -- in this universe or any other similar multiverse node. Void where prohibited. Your mileage may vary. Caveat emptor.

        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