Wireshark mailing list archives

QT wireshark problem no such slot


From: Alexis LE METAYER <alexis.lemetayer () gmail com>
Date: Tue, 29 Sep 2015 16:21:03 +0200

Hi everyone,

I'm trying to modify the sources codes of wireshark QT but apparently I
can't add new slots. I mean i added in main_windows.h my declaration,

void PingCouter();

in main_windows_slot.cpp my code

void MainWindow::PingCounter()
{

  plugin_test *test = new plugin_test(this);
  test->show();
}

and in main_windows.cpp my connect slot

  QAction *Ping_Counter = new QAction;
  connect(Ping_Counter, SIGNAL(triggered()), this, SLOT(PingCounter()));

I have no compilation errors but i have a runtime message :

  QObject::connect: No such slot MainWindow::PingCounter()
  QObject::connect:  (receiver name: 'MainWindow')

I watched in moc_main_windows.cpp to be sure that my slot was here but it
is not. therefore i think there is a problem here but i don't know how to
resolve this one.

thanks for your help
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev () wireshark org>
Archives:    https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request () wireshark org?subject=unsubscribe

Current thread: