[Qt-interest] can not create the slot in the main()

Scott Aron Bloom Scott.Bloom at onshorecs.com
Sat Nov 13 03:36:04 CET 2010


Don't know about Java+Jami, but in C++, you have to declare the method
as a slot.

 

So my bet is that its not recognizing your start function as a slot


Scott

 

From: qt-interest-bounces at trolltech.com
[mailto:qt-interest-bounces at trolltech.com] On Behalf Of go canal
Sent: Friday, November 12, 2010 6:22 PM
To: qt-interest at trolltech.com
Subject: [Qt-interest] can not create the slot in the main()

 

Hello,

I got an error: 

"

Exception in thread "main" com.trolltech.qt.QNoSuchSlotException: 

Could not find slot with signature: start()

"

 

I am using Jambi 4.5.2

 

Here is my main class -  it starts the Netty network server then goes
into the event loop:

-----------------------

public class Main extends QObject {

  public static void main(String[] args) {

  QApplication.initialize(args);

  // start the Netty server

  NettyServer netty = new NettyServer();

  netty.receivedURL.connect(Main.class, "start()");

  netty.run();

 

  // Qt event loop

  QApplication.exec();

  }

 

  private void start() {

    // do something

  }

}

 

The error message happened when trying to establish the connection,

 

Any idea? Appreciate your help very much.

 

thanks,
canal

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20101112/b0132e5f/attachment.html 


More information about the Qt-interest-old mailing list