[PyQt] QtWebKit and QtWebKitWidgets
Gianluca Romanin
romaninz at gmail.com
Mon Sep 15 10:19:18 BST 2014
Thank you Florian!
- qWebKitVersion is what I need! :)
- I was not aware of the Blink switch for Qt 5.4 but I am forced to use
what I have now.
- I am already using QtWebKitWidgets in such a way. I didn't find out the
difference between QtWebkit and QtWebKitWidgets in the webkit version (the
docs talks about webkit1 and webkit2).
- well... I didn't know your project. Good to find it! I am currently
coding just a little inline browser for a Html5 embedded app. So this is
not exactly the case of Qutebrowser.
Thank you again!
Best regards,
------------------------------------------------------
Gianluca Romanin (aka J_Zar)
------------------------------------------------------
On Mon, Sep 15, 2014 at 11:03 AM, Florian Bruhin <me at the-compiler.org>
wrote:
> * Gianluca Romanin <romaninz at gmail.com> [2014-09-15 10:36:50 +0200]:
> > I'm using the Qt widget style to build a little Webkit browser.
> > I need some Html5 features and I would like to know what version of
> Webkit
> > I'm currently using.
> > How I can do it? I can't find lot of infos about the Webkit version used
> by
> > Qt.
>
> You can do this:
>
> from PyQt5.QtWebKit import qWebKitVersion
> print(qWebKitVersion())
>
> For me it's 538.1 with Qt 5.3.1.
>
> Also note QtWebKit will be deprecated eventually:
>
> http://blog.qt.digia.com/blog/2014/09/08/qt-5-4-alpha-available/
>
> Maybe it would make more sense for you to wait some more weeks for
> Qt5.4 and (hopefully) PyQt bindings for QtWebEngine, and then use
> that?
>
> Though I think it'll be some more months or even years before QtWebKit
> is fully deprecated, but that's only a guess.
>
> > It is not clear to me what are the differences between QtWebKit and
> > QtWebKitWidgets.
>
> In QtWebKit there are some WebKit related modules which aren't widgets.
> Basically the same thing like QtCore and QtWidgets.
>
> >>> for e in dir(QtWebKit):
> ... if not e.startswith('__'):
> ... print(e)
> ...
> QWebDatabase
> QWebElement
> QWebElementCollection
> QWebHistory
> QWebHistoryInterface
> QWebHistoryItem
> QWebPluginFactory
> QWebSecurityOrigin
> QWebSettings
> qWebKitMajorVersion
> qWebKitMinorVersion
> qWebKitVersion
>
> > It seems that QtWebKit is used mainly for QML and that wraps a more
> recent
> > version of Webkit: QtWebKit dll is about 18 MB while QtWebKitWidgets dll
> is
> > not even 1MB. If so, how can I use QtWebKit in a QWidget style
> application
> > without QML? Is it possible?
>
> Yes, by importing QtWebKitWidgets instead ;)
>
> A minimal example showing a webpage:
>
> import sys
>
> from PyQt5.QtCore import QUrl
> from PyQt5.QtWidgets import QApplication
> from PyQt5.QtWebKitWidgets import QWebView
>
> app = QApplication(sys.argv)
> wv = QWebView()
> wv.load(QUrl(sys.argv[1]))
> wv.show()
> app.exec_()
>
> By the way: Depending on what you're building exactly, it might make
> more sense to join an existing project:
>
> - I'm building a vim-like browser using PyQt and QtWebKit, see
> https://github.com/The-Compiler/qutebrowser
>
> I'd love some contributors, and I'm happy to mentor and help people
> along the way.
>
> - Detlev Offenbach is working on the eric IDE[1] which has an
> integrated very feature-complete browser, and he told me he's
> interested in people helping out with it, and also with turning it
> into a standalone application. I think he's reading here as well.
>
> [1] http://eric-ide.python-projects.org/
>
> Florian
>
> --
> http://www.the-compiler.org | me at the-compiler.org (Mail/XMPP)
> GPG 0xFD55A072 | http://the-compiler.org/pubkey.asc
> I love long mails! | http://email.is-not-s.ms/
>
> _______________________________________________
> PyQt mailing list PyQt at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20140915/53b7d0c3/attachment.html>
More information about the PyQt
mailing list