CEF + QT integration on Linux

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

CEF + QT integration on Linux

Postby developer » Wed Dec 28, 2016 10:47 am

I'm trying to create Qt application with Cef browser working on Linux (Debian Wheezy)
Versions: Qt 5.5, Cef 1547

Basically, I have QWidget with following browser initialization code:
Code: Select all
CefwindowInfo info;
QWindow* win = new QWindow();
this->layout()->addWidget(QWidget::createWindowContainer(win));
info.SetAsChild((CefWindowHandle)win->winId());
CefBrowserHost::CreateBrowser(info, ...);


This code causes Segmentation fault exception with following callstack
Code: Select all
0> g_type_check_instance_cast
1> CefBrowserHostImpl::PlatformCreateWindow()
2> ??


If I comment out the line with info.SetAsChild(..) , everything works as expected save that Cef is launched in separate window, while I need it to be integrated in my Qt application.

Any ideas what am I doing wrong?
developer
Newbie
 
Posts: 2
Joined: Wed Dec 28, 2016 10:25 am

Re: CEF + QT integration on Linux

Postby magreenblatt » Mon Jan 09, 2017 12:31 pm

Your CEF version is very old. You should update to a currently supported CEF version as listed at https://bitbucket.org/chromiumembedded/ ... -supported

You can compare to how Qt integration was implemented in an existing project like http://tishion.github.io/QCefView/.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm


Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 51 guests