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

Koehne Kai Kai.Koehne at theqtcompany.com
Tue Dec 8 09:13:14 CET 2015



> -----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 :)

Regards

Kai


More information about the QtWebEngine mailing list