[Qt-interest] webkit with no GUI
Benjamin
ikipou at gmail.com
Sat Dec 13 20:31:44 CET 2008
Hi,
I have no idea if you can make Webkit work without a gui, but it seem that
the problem come from the call to QApplication::style(). You could try to
make a subclass of QApplication, overriding ::style() to return your own
QStyle.
Please respond if it works, I'm curious if webkit could work on the commande
line :-)
regards,
Benjamin
2008/12/13 Daniel Vérité <daniel.verite at gmail.com>
> Hi,
>
> The doc says that QWebPage can be used in a widgetless environment, but
> when called within a non-GUI QApplication, the QWebPage's constructor
> fails:
>
> #0 0xb804c430 in __kernel_vsyscall ()
> #1 0xb6248880 in raise () from /lib/tls/i686/cmov/libc.so.6
> #2 0xb624a248 in abort () from /lib/tls/i686/cmov/libc.so.6
> #3 0xb65ec7d4 in qt_message_output (msgType=QtFatalMsg,
> buf=0xbfb4abf0 "ASSERT: \"!\"No style available in non-gui
> applications!\"\" in file kernel/qapplication.cpp, line 1233") at
> global/qglobal.cpp:2102
> #4 0xb65ec858 in qFatal (msg=0xb676fc84 "ASSERT: \"%s\" in file %s,
> line %d")
> at global/qglobal.cpp:2303
> #5 0xb65eccb4 in qt_assert (
> assertion=0xb72ab660 "!\"No style available in non-gui
> applications!\"",
> file=0xb72ab3c8 "kernel/qapplication.cpp", line=1233)
> at global/qglobal.cpp:1872
> #6 0xb6b900fa in QApplication::style () at
> kernel/qapplication.cpp:1233
> #7 0xb7b31bc0 in WebCore::PlatformScrollbar::verticalScrollbarWidth (
> controlSize=WebCore::RegularScrollbar)
> at platform/qt/PlatformScrollBarQt.cpp:510
> #8 0xb7b3ad4a in WebCore::ScrollView::updateScrollbars
> (this=0x89a4f60,
> desiredOffset=@0x89a4f98) at platform/qt/ScrollViewQt.cpp:476
> ...
>
> My use-case is a unix batch program that would convert HTML files to
> PDF with no X server available. Am I out of luck?
>
> Best regards,
> --
> Daniel
> PostgreSQL-powered mail user agent and storage:
> http://www.manitou-mail.org
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20081213/03b03b3f/attachment.html
More information about the Qt-interest-old
mailing list