Results 1 to 5 of 5

Thread: Qt-problem with images

  1. #1

    Thread Starter
    Lively Member illebille's Avatar
    Join Date
    Sep 2003
    Posts
    77

    Question 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

  2. #2

    Thread Starter
    Lively Member illebille's Avatar
    Join Date
    Sep 2003
    Posts
    77

    Re: Qt-problem with images

    Anybody ? Please ?

  3. #3
    Interweb adm/o/distrator Paul M's Avatar
    Join Date
    Nov 2006
    Location
    Australia, Melbourne
    Posts
    2,306

    Re: Qt-problem with images

    What version of Qt are you using?

  4. #4

    Thread Starter
    Lively Member illebille's Avatar
    Join Date
    Sep 2003
    Posts
    77

    Re: Qt-problem with images

    I'm using Qt 4.2.3

  5. #5
    Interweb adm/o/distrator Paul M's Avatar
    Join Date
    Nov 2006
    Location
    Australia, Melbourne
    Posts
    2,306

    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
  •  



Click Here to Expand Forum to Full Width