Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: Re: [Wireshark-dev] QT wireshark problem no such slot

Date Prev · Date Next · Thread Prev · Thread Next
From: Graham Bloice <graham.bloice@xxxxxxxxxxxxx>
Date: Wed, 30 Sep 2015 14:28:08 +0100

On 29 September 2015 at 15:21, Alexis LE METAYER <alexis.lemetayer@xxxxxxxxx> wrote:

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();

Is the above a typo?, Should it be "void PingCounter();"
 

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





--
Graham Bloice