[PyQt] QtWebEngineView and QtTest on 5.8
Kevin Mcintyre
kebin70 at gmail.com
Thu Mar 2 03:11:42 GMT 2017
Disregard - it's working on a pristine instance - I think I incorrectly
built with SIP 4.17.1 on my local, or something equivalently idiotic.
Thanks for the feedback.
On Wed, Mar 1, 2017 at 10:31 AM, Phil Thompson <phil at riverbankcomputing.com>
wrote:
> On 28 Feb 2017, at 4:53 am, Kevin Mcintyre <kebin70 at gmail.com> wrote:
> >
> > Prior to 5.8 I was able to simulate a keyclick on QtWebEngineView:
> >
> > --- 5.7.1 Output ---
> > 5.7.1
> > finished
> > --- 5.8.0 Output ---
> > 5.8.0
> > exception: PyQt5.QtCore.QAbstractAnimation represents a C++ abstract
> class and cannot be instantiated
> > ---
> >
> > import sys
> >
> > from PyQt5.QtWebEngineWidgets import QWebEngineView
> > from PyQt5.QtWidgets import QApplication
> > from PyQt5.QtCore import QUrl
> > from PyQt5 import QtCore
> >
> > app = QApplication(sys.argv)
> > qev = QWebEngineView()
> > qev.show()
> >
> > print QtCore.qVersion()
> >
> > def runTest():
> > try:
> > from PyQt5.QtTest import QTest
> > from PyQt5.QtCore import Qt
> > QTest.keyClick(qev, Qt.Key_Tab)
> > print 'finished'
> > except Exception as e:
> > print 'exception:', e
> > finally:
> > exit()
> >
> > qev.page().loadFinished.connect(runTest)
> > qev.load(QUrl('http://google.com'))
> > app.exec_()
>
> Works fine for me.
>
> Phil
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20170301/ad346366/attachment-0001.html>
More information about the PyQt
mailing list