Results 1 to 2 of 2

Thread: QT 4.2.3 Using GTK Widgets inside QT App

  1. #1
    Join Date
    Apr 2007
    Location
    United States
    Posts
    17
    Thanks
    2
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default QT 4.2.3 Using GTK Widgets inside QT App

    Hey guys,

    I'm working on embedding Gecko in a QT app using GtkMozEmbed. With Qt 4.2 now using the glib event loop I want to integrate Gtk based widgets with my qt apps, in the same process. Has anyone had good success with that? Or do i still need to use QX11EmbedContainer? I have a simple app i found googling that uses both QT and Gtk in the same app. Showing a qt window with a button, that when clicked will launch a gtk window with a button, that goes back the other direction.

    A simple question would be has anyone been able to do something like display a window with two buttons, one using QT and one using Gtk side by side in the initial qt window? Is there any particular technique to say, building a class extending QWidget that the gui components within are all built using Gtk, that would allow me to instantiate it in any other qt app and display it?

    Thanks,
    Chuck

  2. #2
    Join Date
    Jan 2006
    Location
    11 N 78 E
    Posts
    110
    Thanks
    10
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QT 4.2.3 Using GTK Widgets inside QT App

    I don't have an answer to your exact question but I do know that it is possible to draw GTK widgets using Qt -- that involves writing a GTK style which just calls the Qt widgets -- similarly perhaps it would be possible to have a Qt style which uses GTK widgets.

    But I don't think that in a Qt application you can draw a GTK widget at all (directly I mean). The reason being that I don't think a GTK widget will submit to the control of a QLayout, or that a QLayout has the capability of handling a GTK widget. I do not think that a widget that a QLayout cannot handle can be drawn. But maybe you could directly write an X app which uses both the Qt and GTK widgets but then you would have to take care of layout etc yourself which would be a pain.

    Of course, I'm not as knowledgeable as many people around here and my opinion may be wrong. I only answered because I noticed your question was unanswered for two days. I hope this helps at least a bit.
    Penguin #395953 using Qt for open-source development on X11 using C++ and
    Python via PyQt

Similar Threads

  1. QLogText & QLogTable : 2 widgets to display text log
    By fcoiffie in forum Qt-based Software
    Replies: 7
    Last Post: 28th April 2019, 07:52
  2. Performance in hiding/showing widgets
    By Paalrammer in forum Newbie
    Replies: 12
    Last Post: 14th February 2007, 18:57
  3. Replies: 11
    Last Post: 7th July 2006, 13:09
  4. How to movable dock widgets?
    By becond in forum Qt Tools
    Replies: 3
    Last Post: 21st February 2006, 19:57
  5. Creating Widgets
    By hylke in forum Qt Programming
    Replies: 2
    Last Post: 5th February 2006, 08:37

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.