Seite 1 von 1

QApplication::setLibraryPaths unter Linux funktioniert nicht

Verfasst: 10. Januar 2010 12:54
von NoRulez
Hey @all,

ich habe die library pfade wie folgt angepasst:

Code: Alles auswählen

    QStringList libraryPaths = QStringList()
                               << qApp->applicationDirPath()
                               << qApp->applicationDirPath().append("/plugins")
                               << qApp->applicationDirPath().append("/plugins/sqldrivers")
                               << qApp->applicationDirPath().append("/plugins/languages")
                               << qApp->applicationDirPath().append("/plugins/modules")
                               << qApp->applicationDirPath().append("/plugins/styles");
    QApplication::setLibraryPaths(libraryPaths);
diese funktionieren unter Windows auch wie gewünscht. Mein Problem ist es nun das diese unter Linux überhaupt nicht funktionieren, was heißt das die Styles, Sprachen udgl. nicht geladen werden. Selbst die sql treiber werden nicht geladen.

Kann mir diesbezüglich jemand helfen?

Vielen Dank im Voraus
LG NoRulez

Verfasst: 10. Januar 2010 20:08
von Christian81
Diese Pfade sind auch unter Windows total unnötig... und wenn man 'plugins' weglässt (so wie es auch in der Doku steht funktioniert es auch...

Verfasst: 10. Januar 2010 21:12
von NoRulez
Wieso unnötig?

Die Pfade meiner Applikation sind wie folgt:

Code: Alles auswählen

Programname (C:\Program files (x86)\Programname)
        |
        +---- Programname.exe
                Qt*4.dll
        +---- plugins
                     |
                     +------ languages
                     +------ modules
                     +------ styles
                     +------ sqldrivers
Schlimm genug das ich die sql treiber nicht in ein Verzeichnis mit dem Namen meiner Wahl kopieren kann.

LG NoRulez

Verfasst: 10. Januar 2010 22:56
von FaS
QCoreApplication::addLibraryPath( QDir::cleanPath( QCoreApplication::applicationDirPath() + '/plugins' ) );
Nicht mehr, nicht weniger. Die Dateien heißen dann z.b. .../plugins/sqldrivers/libqsqlite.so