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

Michael Brüning michael.bruning at theqtcompany.com
Tue Dec 8 10:06:49 CET 2015


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





More information about the QtWebEngine mailing list