[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    [PyKDE] QTextBrowser: no mimesource for
From:       Martin.Zohlhuber () tttech ! com
Date:       2004-03-30 8:39:36
Message-ID: OF28E83E6F.90BA7594-ONC1256E67.002E27E4-C1256E67.002F8871 () vie ! at ! tttech ! ttt
[Download RAW message or body]

Hello 

I want show html file (from internet and local filesystem) in my PyQT 
application. 
QTextBrowser-Widget  should do it. 

 When i load (setSource) a html i get always:
"QTextBrowser: no mimesource for x.html"
and a blank Textbrowser. 

I test a few things (set my own mimefactory.....) but i get always the 
same result. I search within internet and found 6 similar postings on 
different mailinglist/newsgroup, but no answer or working codeexample. 
What's wrong ? 

Please help me. 
Please post a working code example if possible. 

Thanks for every suggestion !
martin

PS: Work on Win2k with current Qt-Evaluation-version and 
PyQt-win-edu-msvc-3.11.exe

--------------------------------
My test-code equal to official "Simple HTML Help Browser" C++ Example:

import qt
import sys 
app = qt.QApplication (sys.argv)
main = qt.QMainWindow ()
filename = qt.QDir( qt.QString("./x.html") ).absPath()
browser = qt.QTextBrowser (main)
browser.mimeSourceFactory().setFilePath(qt.QStringList("."))
# browser->setFrameStyle( QFrame::Panel | QFrame::Sunken );
browser.setSource( filename)
browser.setFocus()
main.setCentralWidget (browser)
app.setMainWidget (main)
main.show ()
app.exec_loop ()

_______________________________________________
PyKDE mailing list    PyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic