Buffer d'erreur trop petit lors affichage mauvaise URL ?
Bonjour,
Voici un code minimaliste qui reproduit mon problème :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| from PyQt4 import QtCore, QtGui, QtWebKit
import sys
app = QtGui.QApplication(sys.argv)
url = QtCore.QUrl( "lk" )
if url.isValid() == True :
print "URL Valide"
page = QtWebKit.QWebView()
page.load(url)
else:
print "URL Invalide"
app.exec_() |
La sortie en console est :
Citation:
URL Valide
QIODevice::read: maxSize argument exceeds QByteArray size limit
Qt has caught an exception thrown from an event handler. Throwing
exceptions from an event handler is not supported in Qt. You must
reimplement QApplication::notify() and catch all exceptions there.
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
L'URL n'est pas valide, quoi qu'en dise la méthode isValid() et je présume que QtWebKit renvoie une erreur énorme qui ne rentre pas dans le buffer, mais j'aimerais comprendre un peu mieux ce qui se passe et comme je peux m'en prémunir.
Merci d'avance pour vos réponses ^^