Trolltech Home | Qt-jambi-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 1

Qt-jambi-interest Archive, February 2008
Difficult basics


Message 1 in thread

Dear group,

I am trying to get started with qt-jambi and the first "Hello world" example:

HelloWorld.java
--------------------------------------------------
import com.trolltech.qt.gui.*;

    public class HelloWorld
    {
        public static void main(String args[])
        {
            QApplication.initialize(args);

            QPushButton hello = new QPushButton("Hello World!");
            hello.resize(120, 40);
            hello.setWindowTitle("Hello World");
            hello.show();

            QApplication.exec();
        }
    }

----------------------------------------------------
I include qt-jambi bin directory in my PATH var:

        PATH=C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;C:\Java\jdk1.6.0_02\bin;"C:\program files\qtjambi-win32-gpl-4.3.3_01\bin"

I compile with including qtjambi.jar in the classpath:

        C:\>javac -classpath .;"C:\program files\qtjambi-win32-gpl-4.3.3_01\qtjambi.jar" HelloWorld.java

and I try run HelloWorld.class (also with classpath):

        C:\>java -classpath .;"C:\program files\qtjambi-win32-gpl-4.3.3_01\qtjambi.jar" HelloWorld

which throws following error:

Exception in thread "main" java.lang.UnsatisfiedLinkError: com.trolltech.qt.core.QtJambi_LibraryInitializer__qt_initLibrary()V
        at com.trolltech.qt.core.QtJambi_LibraryInitializer.__qt_initLibrary(Native Method)
        at com.trolltech.qt.core.QtJambi_LibraryInitializer.<clinit>(QtJambi_LibraryInitializer.java:10)
        at com.trolltech.qt.core.QAbstractFileEngineHandler.<clinit>(QAbstractFileEngineHandler.java:10)
        at com.trolltech.qt.QtJambi_LibraryInitializer.<clinit>(QtJambi_LibraryInitializer.java:29)
        at com.trolltech.qt.QtJambiObject.<clinit>(QtJambiObject.java:29)
        at HelloWorld.main(HelloWorld.java:6)

Anyone know what I missed in the installation/paths/etc ?

My system is Windows XP Prof. SP2

Regards,
Mikael


Message 2 in thread

> I include qt-jambi bin directory in my PATH var:
> 
>         PATH=C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;C:\Java\jdk1.6.0_02\bin;"C:\program files\qtjambi-win32-gpl-4.3.3_01\bin"

Try including the Qt Jambi lib directory in your PATH (C:\program 
files\qtjambi-win32-gpl-4.3.3_01\lib) instead of (or in addition to) the bin directory.

-Adam Batkin



Message 3 in thread

Mikael Lundin wrote:
> Dear group,
> 
> I am trying to get started with qt-jambi and the first "Hello world" example:
> 
> HelloWorld.java
> --------------------------------------------------
> import com.trolltech.qt.gui.*;
> 
>     public class HelloWorld
>     {
>         public static void main(String args[])
>         {
>             QApplication.initialize(args);
> 
>             QPushButton hello = new QPushButton("Hello World!");
>             hello.resize(120, 40);
>             hello.setWindowTitle("Hello World");
>             hello.show();
> 
>             QApplication.exec();
>         }
>     }
> 
> ----------------------------------------------------
> I include qt-jambi bin directory in my PATH var:
> 
>         PATH=C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;C:\Java\jdk1.6.0_02\bin;"C:\program files\qtjambi-win32-gpl-4.3.3_01\bin"

Hi,

The binaries are loaded from "bin" on windows and "lib" on Linux and Mac 
OS X, so "bin" should be enough. Could you try without the quotes?

If that doesn't help, you can try starting the application with

java -Dcom.trolltech.qt.verbose-loading [your other options]

And see if the output gives any clearer indication of what is wrong.

-
best regards,
Gunnar


Message 4 in thread

Hi All,

Is it possible to mix QT UI with Swing UI elements, and are there any  
examples of doing so? I also wondered if there is any ability to  
integrate with JOGL? I know that QT has its own OpenGL widget, I'm  
just concerned that it my be too high level.. I want to be able to  
integrate shaders, non visible pixel buffers etc etc - is this still  
possible with Jambi?

Peter


Message 5 in thread

Peter Dove wrote:
> Hi All,

Hi Peter,

> Is it possible to mix QT UI with Swing UI elements, and are there any 
> examples of doing so?

It is currently only possible to mix top-level windows from AWT/swing 
and Qt Jambi on Linux and Windows

We are working on an integration layer where it is possible to mix AWT 
and Qt Jambi components. The project is work in progess and is located 
on our labs site:

http://labs.trolltech.com/page/Projects/QtJambi/QtJambiAwtBridge

This project is for Linux and Windows only, but it gives a hint of what 
we're trying to do. Feel free to try it out!

  I also wondered if there is any ability to
> integrate with JOGL? I know that QT has its own OpenGL widget, I'm just 
> concerned that it my be too high level.. I want to be able to integrate 
> shaders, non visible pixel buffers etc etc - is this still possible with 
> Jambi?

There is a demo in the com/trolltech/demos/HelloGL.java that shows how 
to mix JOGL with our OpenGL widget. You should start with that and 
proceed from there.