i use the demo browser which is provided by qt
it can go to the website, but it cannot display the jpeg and gif file.
can anyone help me?
Thanks!
i use the demo browser which is provided by qt
it can go to the website, but it cannot display the jpeg and gif file.
can anyone help me?
Thanks!
Make sure you provide the needed image plugins for displaying jpeg and gif.
thanks for your reply.
but i dont know which image plugins that i need.
i just use the demo browser, but havent change any codes.
The jpeg and the gif plugin and any other image format you want to be displayed.Yeah, but you must make sure Qt finds the plugins locationed under imageformats. If you run the browser from the Qt Comand Line, did you see the images? If you distribute the app, you have to deliver the plugins alongside your app. See http://doc.trolltech.com/4.7/deployment-windows.htmli just use the demo browser, but havent change any codes.
actually, the demo browser can display the jpeg and gif in my computer (which is installed qt and the vs2008)
however, when i put the browser.exe (rebuild the program wihtout changing any codes) in another computers (which does not installed qt and vs2008),
it can still go to the website, but cannot display jpeg or gif
stmk (23rd October 2010)
thanks so much!
I put the following code in the main function
QCoreApplication::addLibraryPath(QCoreApplication: :applicationDirPath()+"/imageformats");
then it works now!
Do you have an "imageformats" subdirectory inside your "imageformats" directory?
no
actually, i put the "imageformats" folder in the release folder (browser.exe also inside in release folder)
\browser\release\imageformats
when i click browser.exe, it can show the jpeg and gif
Then remove the addLibraryPath() call because it doesn't do anything. It would work if you had an imageformats subdirectory in imageformats directory.
stmk (23rd October 2010)
i see..
thanks so much anyway!
Bookmarks