| Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date | |
| All threads index page 3 | |
I'm using Qt 4.3.0, Windows.
When I run my application in other computers, it fails to load or save jpeg images.
I have put the images plugin DLLs in {app-dir}/plugins/imageformats folder (app-dir is the application directory) and I have added this code in the main of my application:
QString pluginsPath = QCoreApplication::applicationDirPath() + "/plugins/imageformats";
QCoreApplication::addLibraryPath(pluginsPath);
I have tried also this:
QCoreApplication::addLibraryPath("./plugins/imageformats");
but doesn't work.
What's wrong?
--
[ signature omitted ]
fabiodago wrote:
> When I run my application in other computers, it fails to
> load or save jpeg images.
>
> I have put the images plugin DLLs in
> {app-dir}/plugins/imageformats folder (app-dir is the
> application directory) and I have added this code in the main
> of my application:
>
> QString pluginsPath = QCoreApplication::applicationDirPath()
> + "/plugins/imageformats";
> QCoreApplication::addLibraryPath(pluginsPath);
>
> I have tried also this:
>
> QCoreApplication::addLibraryPath("./plugins/imageformats");
>
> but doesn't work.
I think you have to set the path to "./plugins". (or
applicationDirPath()+"/plugins")
Hope it helps,
Peter
--
[ signature omitted ]
On Fri, Jan 18, 2008 at 03:57:37PM +0100, fabiodago@xxxxxxxxx wrote:
> I'm using Qt 4.3.0, Windows.
>
> When I run my application in other computers, it fails to load or save jpeg images.
>
> I have put the images plugin DLLs in {app-dir}/plugins/imageformats folder (app-dir is the application directory) and I have added this code in the main of my application:
>
It's enough to place "imageformats" directory in app directory. Yes, without
"plugins" directory.
--
[ signature omitted ]
Attachment:
signature.asc
Description: Digital signature