The Artima Developer Community
Sponsored Link

Programming in Scala Forum
Scala, NetBeans, Qt Jambi

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Brian Pattison

Posts: 1
Nickname: 53402
Registered: Jan, 2008

Scala, NetBeans, Qt Jambi Posted: May 24, 2008 12:29 PM
Reply to this message Reply
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

Topic: Scala for Ubuntu Previous Topic   Next Topic Topic: Index seems a little thin


Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2017 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us