[Qtwebengine] How do I run web engine on a sever without a display?

Nemo 377307289 at qq.com
Tue Dec 8 10:15:03 CET 2015


I also found the app crash with "-platform offscreen".




------------------ 原始邮件 ------------------
发件人: "Michael Brüning";<michael.bruning at theqtcompany.com>;
发送时间: 2015年12月8日(星期二) 下午5:06
收件人: "qtwebengine"<qtwebengine at qt-project.org>; 

主题: Re: [Qtwebengine]回复: How do I run web engine on a sever without a display?



Hi all,

On 12/08/2015 09:13 AM, Koehne Kai wrote:
>> -----Original Message-----
>> From: QtWebEngine [mailto:qtwebengine-bounces at qt-project.org] On Behalf
>> Of Florian Bruhin
>> Sent: Tuesday, December 08, 2015 7:04 AM
>> To: Nemo <377307289 at qq.com>
>> Cc: qtwebengine <qtwebengine at qt-project.org>
>> Subject: Re: [Qtwebengine] 回复: How do I run web engine on a sever without
>> a display?
>>
>> * Nemo <377307289 at qq.com> [2015-12-08 13:58:37 +0800]:
>>> Do not call show() member function of widgets, the application will become a
>> console application.
>>
>> Have you actually tried?
>>
>> It's not that easy. As soon as you want to create a QApplication, you need a
>> DISPLAY. And creating a widget without a QApplication won't work.
> There's the offscreen QPA plugin to allow this. Start your application with
>
>    -platform offscreen
> And you should be able to use QApplication/QWidget's even without a window.
>
> Anyhow, there still might be dragons when it comes to QtWebEngine ... Please
> keep us up to date :)

Unfortunately, this will crash with a SIGSEGV in a non-GUI terminal. Im 
afraid that for now, the quick fix will be running web engine in xvfb  
(FWIW, that is also how we used to run LayoutTests on a server with Qt 
WebKit).
>
> Regards
>
> Kai
> _______________________________________________
> QtWebEngine mailing list
> QtWebEngine at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/qtwebengine

--
Best regards,
Michael


_______________________________________________
QtWebEngine mailing list
QtWebEngine at qt-project.org
http://lists.qt-project.org/mailman/listinfo/qtwebengine
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qtwebengine/attachments/20151208/8b0b75a1/attachment.html>


More information about the QtWebEngine mailing list