Scala, NetBeans, Qt Jambi
Posted: May 24, 2008 12:29 PM
Advertisement
I'm trying to get QtJambi working in a simple Scala application using the nightly build of NetBeans. I have everything hooked up so that it compiles, and it "sorta" works. Here's my code. package scalahello import com.trolltech.qt.gui.QApplication import com.trolltech.qt.gui.QPushButton object Main { def main(args: Array[String]) = { QApplication.initialize(args); val hello = new QPushButton("Hello World") hello.resize(120, 40) hello.show() // QApplication.exec(); } } The above code displays a "Hello World" Push Button for a fraction of a second before exiting. To get it to work with a proper event loop I need to uncomment QApplication.exec(). But when I do that I get the following exception. java.lang.NoSuchMethodError: main Exception in thread "main" Java Result: 1 The Java version of the same code in NetBeans works great. Thanks for any ideas you might have. - Brian