Re: [PyQt] problems with QTextBrowser

2008-04-16 Thread Dusan Zatkovsky
On Wed 16. April 2008 11:46:26 Aaron Digulla wrote: > Quoting Dusan Zatkovsky <[EMAIL PROTECTED]>: > > I have tried "print repr ( html )" and it prints strange charracters ( > > <\x00h\x00t\x00m\x00l\x00>\x00<\x00h ... ). Couldn't be problem there? > > Yup. The 0-byte (\x00) is the "end of text" ch

Re: [PyQt] problems with QTextBrowser

2008-04-16 Thread Aaron Digulla
Quoting Dusan Zatkovsky <[EMAIL PROTECTED]>: I have tried "print repr ( html )" and it prints strange charracters ( <\x00h\x00t\x00m\x00l\x00>\x00<\x00h ... ). Couldn't be problem there? Yup. The 0-byte (\x00) is the "end of text" character. The zero bytes come from unicode. It seems that yo

Re: [PyQt] problems with QTextBrowser

2008-04-16 Thread Dusan Zatkovsky
I see some progress with the problem, but it is still not what i am looking for. Here is my debug code: # decode base64 data html = utils.decB64 ( data ) print type ( html ) # prints "" print repr ( html ) # prints "'<\x00h\x00t\x00m\x00l\x00>\x00<\x00h\x00e\x00a blahblah..." # it seems to be

Re: [PyQt] problems with QTextBrowser

2008-04-16 Thread Dusan Zatkovsky
On Tue 15. April 2008 21:52:08 Aaron Digulla wrote: > I have no idea; the code looks good and should do what you expect. Some > tips to debug this: Query the textBrowser for its contents right after > setHtml() with getText() and getHtml(). After setHtml(), textbrowser returns QString with the sam

Re: [PyQt] problems with QTextBrowser

2008-04-15 Thread Aaron Digulla
Dusan Zatkovsky schrieb: > Hi there. > > I have problem with QTextBrowser. I am writing db app, which (basically) asks > user for some rich text ( using dialog with QTextEdit ), then it receives > that text as html ( doc = self.ui.textEdit.document(), text = > doc.toHtml() ). That html is conv

[PyQt] problems with QTextBrowser

2008-04-15 Thread Dusan Zatkovsky
Hi there. I have problem with QTextBrowser. I am writing db app, which (basically) asks user for some rich text ( using dialog with QTextEdit ), then it receives that text as html ( doc = self.ui.textEdit.document(), text = doc.toHtml() ). That html is converted to base64 and stored to databas