QtJambi

Java bindings for the powerful Qt
           framework
Qt

 Powerful framework for C++
 GUI, XML, Database, IO, Network, Threads...
 Crossplatfrom including embedded systems
 Do...
GUI - the main reason to use QtJambi

  Native look and feel on all platforms
  Widgets (= GUI components): buttons, selec...
Signals and slots

public class MyGUI {

    private QPushButton button;

    public MyGUI() {
      button = new QPushBut...
Signals and slots

Not the Java-way:
   the clicked signal is a public field
   slot doSomething() referenced as a string
...
quot;On a side note... Qt has been using strings for
signal / slot connections for over a decade and
  in practice this ha...
Other cool feaures

  Easy WebKit integration
  Native libraries - simple deployment as jar
  Deployment as Java WebStart ...
The downside

 Sometimes not quot;the Java wayquot;
 Overlapping functionality with standard Java classes
     QThread
   ...
So is it worth it?
Yes!
(given enough time)
Upcoming SlideShare
Loading in …5
×

JSUG - QTJambi by Jan Zarnikov

997 views

Published on

visit http://jsug.fsinf.at

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
997
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
10
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

JSUG - QTJambi by Jan Zarnikov

  1. 1. QtJambi Java bindings for the powerful Qt framework
  2. 2. Qt Powerful framework for C++ GUI, XML, Database, IO, Network, Threads... Crossplatfrom including embedded systems Double license - GPL & commertial Bindings for Java, Python,Perl, PHP ... QtScript - build extensible application using EcmaScript and much more... But don't we have all these features in java already?
  3. 3. GUI - the main reason to use QtJambi Native look and feel on all platforms Widgets (= GUI components): buttons, select boxes, tables... Subtype QWidget to make your own component easy painting with QPainter (lines, circles, texts) anti-aliasing matrix transformations alpha channel embed other widgets hardware acceleration with OpenGL UI editor (standalone or as Eclipse plugin)
  4. 4. Signals and slots public class MyGUI { private QPushButton button; public MyGUI() { button = new QPushButton(quot;Go!quot;); button.clicked .connect(this,quot;doSomething()quot;); } public void doSomething() { System.out.println(quot;hello worldquot;); } }
  5. 5. Signals and slots Not the Java-way: the clicked signal is a public field slot doSomething() referenced as a string doSomething() can even be private refactoring problematic But: fewer LOC passing of arguments possible safe alternative possible (much longer though)
  6. 6. quot;On a side note... Qt has been using strings for signal / slot connections for over a decade and in practice this has proven to not be a major hurdle. The reason for this is that connections are typically made during the init phase of objects and therefore always checked and fixed at an early stage.quot; --QtJambi FAQ
  7. 7. Other cool feaures Easy WebKit integration Native libraries - simple deployment as jar Deployment as Java WebStart app possible Easy internationalization Phonon integration - crossplatform multimedia playback Drag&drop Crossplatform system tray Style sheets
  8. 8. The downside Sometimes not quot;the Java wayquot; Overlapping functionality with standard Java classes QThread QFile ... Difficult debugging because of native libraries Documentation - C++ code snippets in examples Everything starts with Q Stability (in early versions)
  9. 9. So is it worth it?
  10. 10. Yes! (given enough time)

×