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

List:       kde-devel
Subject:    Displaying text according to mime type
From:       David Jarvie <lists () astrojar ! org ! uk>
Date:       2003-08-28 9:37:37
[Download RAW message or body]

I am trying to display a text file in KTextBrowser, and want it to display 
according to the mime type of the file contents, i.e. as HTML/plain text/etc. 
I tried using QTextBrowser::setSource() to load the file into the 
KTextBrowser. This works for HTML files, but it does not recognise plain text 
files whose file names have no .txt extension - these are displayed blank, 
despite the fact that KMimeType::findByURL() returns "text/plain".

What is the recommended way of loading a file into a KTextBrowser and making 
it use the correct mime type?

--
David Jarvie.
 
>> 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