|
-
Aug 24th, 2007, 06:57 AM
#1
Thread Starter
Lively Member
Qt-problem with images
Hi,
I have a form in which I want to show a manual of the program. The manual is a html-file, which also contains images.
I'm trying to show that manual through a QTextEdit-widget on the form. This is the code I use :
Code:
QFile f("C:\\Data\\Manual\\ScreenVisionSystem.htm");
if(f.open(QIODevice::ReadOnly | QIODevice::Text)){
manualContent->setHtml(QString(f.readAll()));
(manualContent being the QTextEdit widget)
My problem : if I use *.bmp-files in the html-manual, then everything is alright. If I however use *.jpg or *.gif files, none of the images are shown. Can someone please tell me what is going on, what the reason is, and (if possible) how to solve this.
Thanx
-
Aug 27th, 2007, 01:32 AM
#2
Thread Starter
Lively Member
Re: Qt-problem with images
-
Aug 27th, 2007, 02:07 AM
#3
Re: Qt-problem with images
What version of Qt are you using?
-
Aug 27th, 2007, 02:12 AM
#4
Thread Starter
Lively Member
Re: Qt-problem with images
-
Aug 27th, 2007, 02:29 AM
#5
Re: Qt-problem with images
Not to sure what could be the problem.
As for Loading a file you should use QFile and QTextStream to read in the data.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|