Qt5: add plugins to the Qt paths when app is running under mswindows and Qt dll's are deployed inside app dir.

git-svn-id: trunk@63083 -
This commit is contained in:
zeljko 2020-04-26 10:53:32 +00:00
parent 4dec45a42b
commit 35d427d277

View File

@ -17,6 +17,10 @@
Constructor for the class. Constructor for the class.
------------------------------------------------------------------------------} ------------------------------------------------------------------------------}
constructor TQtWidgetSet.Create; constructor TQtWidgetSet.Create;
{$IFDEF MSWINDOWS}
var
WStr: WideString;
{$ENDIF}
begin begin
FLastWFPMousePos := Point(MaxInt, MaxInt); FLastWFPMousePos := Point(MaxInt, MaxInt);
FLastWFPResult := 0; FLastWFPResult := 0;
@ -26,6 +30,11 @@ begin
App := QApplicationH(QCoreApplication_instance()) App := QApplicationH(QCoreApplication_instance())
else else
begin begin
{$IFDEF MSWINDOWS}
//add directory plugins to the Qt paths if Qt is distributed with application under mswindows.
WStr := 'plugins';
QCoreApplication_addLibraryPath(@WStr);
{$ENDIF}
QCoreApplication_setAttribute(QtAA_DisableHighDpiScaling, True); QCoreApplication_setAttribute(QtAA_DisableHighDpiScaling, True);
App := QApplication_Create(@argc, argv); App := QApplication_Create(@argc, argv);
end; end;