[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: KHTMLPart with SSL website
From: "Roger Wang" <fullertonmail () gmail ! com>
Date: 2006-07-25 7:25:41
Message-ID: f5014eff0607250025l7cfa04ccra6b86b4daacdaa8e () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
Hello,
I am currently learning KHTMLPart for web browsing, but I got into some
problems.
When I tried to access SSL site (like https://www.gmail.com), I couldn't
submit any field data. The response was empty.
I wonder if there is any extra steps that I need to do. I tried to find a
solution via google without success. Hopefully someone
could help me out here :)
The following is the python code I did:
from kdeui import *
from khtml import *
from kdecore import *
from qt import *
class Form1(KMainWindow):
def __init__(self):
KMainWindow.__init__(self)
self.lineEdit2 = QLineEdit(self,"lineEdit2")
self.lineEdit2.setGeometry(QRect(0,0,601,31))
self.vBox1 = QVBox(self,"vBox1")
self.vBox1.setGeometry(QRect(0,30,601,631))
self.vBox1 = QVBox(self,"vBox1")
self.vBox1.setGeometry(QRect(0,30,601,631))
self.kHTMLPart1 = KHTMLPart(self.vBox1,"kHTMLPart1")
self.languageChange()
self.resize(QSize(607,665).expandedTo(self.minimumSizeHint()))
self.clearWState(Qt.WState_Polished)
self.connect(self.lineEdit2,SIGNAL("returnPressed()"), self.newURL)
self.connect(self.kHTMLPart1.browserExtension(),SIGNAL("openURLRequest(const
KURL&, const KParts::URLArgs&)"),self.openURLRequest)
def languageChange(self):
self.setCaption(self.__tr("Form1"))
def newURL(self):
e = self.lineEdit2.text().ascii()
r = KURL(e)
QMessageBox.information( self, "url", r.url())
self.kHTMLPart1.openURL(r)
def openURLRequest(self,url,arg):
QMessageBox.information( self, "url", url.url(), arg.contentType() )
self.kHTMLPart1.openURL(KURL(url))
def __tr(self,s,c = None):
return qApp.translate("Form1",s,c)
Thanks for taking a look, any comment will be appreciated :)
Roger
[Attachment #5 (text/html)]
Hello,<br> I am currently learning KHTMLPart for web \
browsing, but I got into some problems.<br>When I tried to access SSL site (like <a \
href="https://www.gmail.com">https://www.gmail.com</a>), I couldn't submit any field \
data. The response was empty. <br>I wonder if there is any extra steps that I need to \
do. I tried to find a solution via google without success. Hopefully someone \
<br>could help me out here :)<br><br>The following is the python code I \
did:<br><br>from kdeui import * <br>from khtml import *<br>from kdecore import \
*<br>from qt import *<br><br>class Form1(KMainWindow):<br> def \
__init__(self):<br> \
KMainWindow.__init__(self)<br><br> \
self.lineEdit2 = QLineEdit(self,"lineEdit2") \
<br> \
self.lineEdit2.setGeometry(QRect(0,0,601,31))<br> \
self.vBox1 = QVBox(self,"vBox1")<br> \
self.vBox1.setGeometry(QRect(0,30,601,631))<br> \
self.vBox1 = QVBox(self,"vBox1")<br> \
\
self.vBox1.setGeometry(QRect(0,30,601,631))<br> \
self.kHTMLPart1 = KHTMLPart(self.vBox1,"kHTMLPart1")<br> \
self.languageChange()<br> \
self.resize(QSize(607,665).expandedTo(self.minimumSizeHint \
()))<br> \
self.clearWState(Qt.WState_Polished)<br> \
self.connect(self.lineEdit2,SIGNAL("returnPressed()"), \
self.newURL)<br> \
self.connect(self.kHTMLPart1.browserExtension(),SIGNAL("openURLRequest(const \
KURL&, const KParts::URLArgs&)"), \
self.openURLRequest)<br><br> def \
languageChange(self):<br> \
self.setCaption(self.__tr("Form1"))<br><br> def \
newURL(self):<br> e = \
self.lineEdit2.text().ascii()<br> r = \
KURL(e)<br> QMessageBox.information( self, \
"url", r.url())<br> \
self.kHTMLPart1.openURL(r)<br><br> def \
openURLRequest(self,url,arg):<br> \
QMessageBox.information( self, "url", url.url(), arg.contentType () \
)<br> \
self.kHTMLPart1.openURL(KURL(url))<br><br> def __tr(self,s,c = \
None):<br> return \
qApp.translate("Form1",s,c)<br><br><br>Thanks for taking a look, any \
comment will be appreciated :)<br><br> Roger<br>
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic