Using CEF in a QT application

Discussion of current events and participation in intelligent conversation with other CEF users.

Using CEF in a QT application

Postby Mayhew » Fri Oct 12, 2012 1:06 pm

I was wondering if anyone has tried using CEF in a an application based on the QT framework. I want to create a cross platform app that utilizes CEF and it seems like QT could be a good option. If anyone has tried it I would like to hear if you ran into any issues with integrating CEF into your project. Thanks.

John
Mayhew
Expert
 
Posts: 288
Joined: Mon Apr 18, 2011 8:02 pm

Re: Using CEF in a QT application

Postby Czarek » Fri Oct 12, 2012 1:09 pm

I would also be interested in an example code on how to integrate CEF in a QT. In CEF Python there are already examples on how to integrate CEF with wxPython and PyGTK. I plan to add a QT example too.
Maintainer of the CEF Python, PHP Desktop and CEF C API projects. I'm available for contract work, see my resume.
User avatar
Czarek
Virtuoso
 
Posts: 1829
Joined: Sun Nov 06, 2011 2:12 am

Re: Using CEF in a QT application

Postby JRub » Mon Oct 15, 2012 8:43 am

I suppose you are aware of the existence of QTWebkit, which is fully functional.
So I'm interested in why you'd integrate CEF with QT rather than just using QTWebkit.
What are the advantages and drawbacks of CEF compared to QTWebkit?
CEF 3.1453.1255 on Windows 7 32bits
JRub
Mentor
 
Posts: 92
Joined: Wed Sep 19, 2012 8:32 am
Location: Paris, France

Re: Using CEF in a QT application

Postby magreenblatt » Mon Oct 15, 2012 8:54 am

JRub wrote:I suppose you are aware of the existence of QTWebkit, which is fully functional.
So I'm interested in why you'd integrate CEF with QT rather than just using QTWebkit.
What are the advantages and drawbacks of CEF compared to QTWebkit?

This might still be relevant: viewtopic.php?f=6&t=395
magreenblatt
Site Admin
 
Posts: 9831
Joined: Fri May 29, 2009 6:57 pm

Re: Using CEF in a QT application

Postby JRub » Mon Oct 15, 2012 9:22 am

I guess CEF advantage is a better and up-to-date rendering and JS engine, then.
But I'm interested in the final results of running CEF in a QT application.
CEF 3.1453.1255 on Windows 7 32bits
JRub
Mentor
 
Posts: 92
Joined: Wed Sep 19, 2012 8:32 am
Location: Paris, France

Re: Using CEF in a QT application

Postby Mayhew » Fri Oct 19, 2012 12:19 pm

Well, it was pretty easy to get it working. I have a simple Qt app working with CEF on Win. I am about to try to get it working on Mac and Linux. So far so good.
Mayhew
Expert
 
Posts: 288
Joined: Mon Apr 18, 2011 8:02 pm

Re: Using CEF in a QT application

Postby Czarek » Tue Nov 20, 2012 5:18 pm

I've created a PyQt example for the cefpython, view it here:
http://code.google.com/p/cefpython/wiki/PyQt
Maintainer of the CEF Python, PHP Desktop and CEF C API projects. I'm available for contract work, see my resume.
User avatar
Czarek
Virtuoso
 
Posts: 1829
Joined: Sun Nov 06, 2011 2:12 am

Re: Using CEF in a QT application

Postby Mayhew » Mon Nov 26, 2012 1:22 pm

I am finally starting on getting CEF integrated into a basic Qt gui app on mac and am running into some issues. Is there a basic doc on how to integrate CEF into a mac project? I am going over the CEFClient project but I think I need a more basic understanding of what is required. I must link against libcef.dylib and libplugin_carbon_interpose.dylib but still get some undefined symbol errors from the linker. There doesn't seem to be a libcef_dll_wrapper.lib/dll component on the mac side so do I have to simply compile the libcef_dll source with my app? What do I need to do with the scripts in the Tools directory?

A simple set of steps on how to integrate CEF into an new cocoa app would be helpful.
Mayhew
Expert
 
Posts: 288
Joined: Mon Apr 18, 2011 8:02 pm

Re: Using CEF in a QT application

Postby magreenblatt » Mon Nov 26, 2012 1:52 pm

The project organization for CEF3 on OS-X is somewhat complicated. The easiest way to understand is by building cefclient and looking at the resulting app bundle contents.

Code: Select all
cefclient.app/
    Contents/
        Frameworks/
            Chromium Embedded Framework.framework/
                Libraries/
                    ffmpegsumo.so <= HTML5 audio/video support
                    libcef.dylib <= CEF dynamic library
                Resources/ <= WebKit cursor resources, cef.pak, localized pak files
            libplugin_carbon_interpose.dylib <= Plugin support
            cefclient Helper.app/
                Contents/
                    Info.plist
                    MacOS/
                        cefclient Helper <= helper executable
                    Pkginfo
            cefclient Helper EH.app/
                Contents/
                    Info.plist
                    MacOS/
                        cefclient Helper EH <= helper executable
                    Pkginfo
            cefclient Helper NP.app/
                Contents/
                    Info.plist
                    MacOS/
                        cefclient Helper NP <= helper executable
                    Pkginfo
        Info.plist
        MacOS/
            cefclient <= cefclient executable
        Pkginfo
        Resources/ <= cefclient resources


The "Chromium Embedded Framework.framework" is an unversioned framework [1] that effectively replaces libcef.dylib. All of the executables are linked to this framework using install_name_tool and a path relative to @executable_path.

The "cefclient Helper" apps are used for executing separate processes (renderer, plugin, etc) with different characteristics [2]. They need to have separate app bundles and Info.plist files so that they don't show dock icons, etc. They effectively just bootstrap the "Chromium Embedded Framework.framework" library.

[1] http://src.chromium.org/viewvc/chrome/t ... iew=markup
[2] http://src.chromium.org/viewvc/chrome/t ... iew=markup
magreenblatt
Site Admin
 
Posts: 9831
Joined: Fri May 29, 2009 6:57 pm

Re: Using CEF in a QT application

Postby Mayhew » Mon Nov 26, 2012 4:41 pm

The CefClient XCode project is a bit overwhelming. Has anyone been successful in integrating CEF into their own Cocoa app vs. starting from the CEFClient project? If so, I would love to hear how you went about it.
Mayhew
Expert
 
Posts: 288
Joined: Mon Apr 18, 2011 8:02 pm

Next

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest