QtWebPage and QCoreApplication
-
Hi,
I am new to QT. I am trying to put together a simple headless browser that runs on server and loads webpages.
How do I run create a console application to load web pages? Is there a way to fake GUI environment?
Thanks
-
It's been discussed many times. You can't use QCoreApplication and GUI together. And WebKit needs GUI. no go without it.
I know 2 ways to do this:
- like it done in wkhtmltopdf project: use X libraries directly + patch Qt & WebKit... to much time expensive, and you still need X libraries installed on system, what means - installed X server on system...
- easy way: use FB! No, FB is not Facebook, it is and always was - Frame Buffer :) If so or so need to install X, just install it virtual frame buffer called xvfb... it is very easy to start and has futures like deph, resolution, etc... so you can even start it from you program directly with exact resolution you need for your widget(no memory waste)....