PDA

View Full Version : My first question on this forum.... very imp for me...



go4mihir
8th September 2011, 11:08
Hello everyone,

I am very much new to qt. I am facing couple of problems regarding the use of Qfile function.

The problems are listed below :

1.) When I am using Qfile class to open file, then it only displays text in the file and the image part doesn't show image.

2.) Can I use hyperlink facility in the file that is open to view using Qfile or any other class of qt.

Waiting for your precious and quick response.

Thanks

Mihir

Rachol
8th September 2011, 11:39
It would be nice indeed to know what kind of a file you are trying to open. Are you new to Qt or Qt and C++?

Lykurg
8th September 2011, 11:42
? QFile is for writing or reading text/data to a file, not for showing images or parsing any hyperlink.

ChrisW67
9th September 2011, 00:48
Reading the content of the file with QFile is trivial... this has nothing to do with interpreting the meaning of the content.

If the file contains HTML, and the images referenced in the image elements are available, then you might be able to display the content in a QTextEdit or QTextBrowser and navigate hyperlinks. If the file contains a PDF/Word/other complex file with embedded links then you need to find another way to display it.