Results 1 to 3 of 3

Thread: Embedding Java in Qt

  1. #1
    Join Date
    Feb 2006
    Posts
    1
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Embedding Java in Qt

    Has anyone experience or knowledge of how to embed a Java Swing app within a C++ based Qt application?

    I'm aware of QtJava but I understand this is just a JNI wrapper around the C++ Qt.
    I am also aware of how to invoke a JVM from C++ but I would like a solution for embedding the Java Swing Gui withing a Qt Frame of some sort so the Java looks as if it is part of the already exisiting C++ Qt application.

    Would it be possible to accomplish something like
    QtC++ app -> QtJava model -> Java Swing view ??

    Thanks.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Embedding Java in Qt

    It is possible to embed a X11 window inside a Qt widget (at least I think so), but I doubt anyone did that for Java windows. I guess it is achievable but probably heavily platform dependent. You'd have to use Xlib to get the window id of your java window and then embed it into Qt somehow. For Windows -- I don't know.

  3. #3
    Join Date
    Feb 2006
    Posts
    1
    Platforms
    Windows

    Default Re: Embedding Java in Qt

    See an article at
    http://codeproject.com/cpp/OOJNIUse.asp
    Maybe it will help you

Similar Threads

  1. polymorphism in java
    By mickey in forum General Programming
    Replies: 0
    Last Post: 13th November 2008, 16:34
  2. java reflection
    By mickey in forum General Programming
    Replies: 1
    Last Post: 24th July 2008, 21:17
  3. Integrate Qt C++ with Java jars
    By nicksnels in forum Qt Programming
    Replies: 4
    Last Post: 6th March 2008, 08:10
  4. Sending string from QT client to Java server
    By seanmu13 in forum Qt Programming
    Replies: 10
    Last Post: 3rd July 2007, 12:52
  5. Sending string from QT client to Java server
    By seanmu13 in forum Newbie
    Replies: 3
    Last Post: 3rd July 2007, 12:20

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.