Wenn ihr eine QT Applikation auf einen PC Laufen zu lassen braucht ihr einige dlls:
- qwindows.dll
- Qt5WinExtras.dll
- Qt5Core.dll
- qoffscreen.dll
- qminimal.dll
Die Main.cpp muss jedoch erweitert werden da sonst der Windows Painter nicht vorhanden ist.
[codesyntax lang=“cpp“]
#include <windows.h>
std::string ExePath() {
char buffer[MAX_PATH];
GetModuleFileName(NULL, buffer, MAX_PATH);
std::string::size_type pos = std::string(buffer).find_last_of("\\/");
return std::string(buffer).substr(0, pos);
}
int main(int argc, char *argv[]) {
std::string p = ExePath();
stringc w;
w = "QT_QPA_PLATFORM_PLUGIN_PATH=";
w += p.c_str();
QApplication::addLibraryPath(p.c_str());
putenv(w.c_str());
if (qApp == 0) {
new QApplication(argc, argv);
}
Start start;
start.show();
return qApp->exec();
}
[/codesyntax]