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. QObject::connect: Cannot connect (null)::pressed to MainWindow::handleExecutionButton()

QObject::connect: Cannot connect (null)::pressed to MainWindow::handleExecutionButton()

Scheduled Pinned Locked Moved Unsolved General and Desktop
c++push buttonconnect
2 Posts 2 Posters 1.2k 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.
  • B Offline
    B Offline
    barzaka12
    wrote on 6 Dec 2019, 00:06 last edited by barzaka12 12 Jun 2019, 00:15
    #1

    Hello,
    I get these 2 errors on build and have no idea why:

    QObject::connect: Cannot connect (null)::pressed to MainWindow::handleExecutionButton()
    QObject::connect: Cannot connect (null)::pressed to MainWindow::handleAbortButton()
    

    Here's a snippet of the code where the connect part is:

    #include "mainwindow.h"
    #include "ui_mainwindow.h"
    
    Ui_MainWindow *form = new Ui_MainWindow();
    
    MainWindow::MainWindow(QWidget *parent)
        : QMainWindow(parent)
        , ui(new Ui::MainWindow)
    {
        ui->setupUi(this);
    
    
        QObject::connect(form->startButton, SIGNAL (pressed), SLOT (handleExecutionButton()));
        QObject::connect(form->stopButton, SIGNAL (pressed), this, SLOT (handleAbortButton()));
    }
    

    You are my last hope. Thank you in advance!

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mpergand
      wrote on 6 Dec 2019, 01:45 last edited by
      #2

      Hi,

      What is that ???

      Ui_MainWindow *form = new Ui_MainWindow();
      

      try:

      connect(ui->startButton, SIGNAL (pressed()), SLOT (handleExecutionButton()));
      
      1 Reply Last reply
      3

      1/2

      6 Dec 2019, 00:06

      • Login

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