Could not find or load the Qt platform plugin "windows".

13,450 views
Skip to first unread message

Dušan D. Majkić

unread,
May 12, 2014, 4:55:32 AM5/12/14
to qtcon...@googlegroups.com
I downloaded latest installation, and I cant start any app in
bin directory. Here is error from hbdbu

---------------------------
hbdbu
---------------------------
This application failed to start because it could not find or load the
Qt platform plugin "windows".

Available platform plugins are: minimal, offscreen, windows.

Reinstalling the application may fix this problem.
---------------------------
OK
---------------------------

I tried to put qwindows.dll from Qt installation, but it still doesn't work.

Also, to compile app with this installation I must set
SET HB_QT_MAJOR_VER=5

or else app will ask for Qt4 libs to link. (not
needed, since the installation is Qt5 based, and Qt libs
are there)


Regards,
Dusan Majkic
Wings Software

Luigi Ferraris

unread,
May 12, 2014, 5:01:40 AM5/12/14
to qtcon...@googlegroups.com
Il 12/05/2014 10.55, Dušan D. Majkić ha scritto:
> I downloaded latest installation, and I cant start any app in
> bin directory. Here is error from hbdbu
Hi Dušan,
I think it's not very possible to run any Qt application (read
QtContribs) without having all Qt dll and plugins in the program
directory or well referenced.
I don't know how other users are able: I always move HbDbu or HbIde
or.... (from Harbour bin directory) to other directory with dll and
plugins. Another solution is to have a .bat and qt.conf well right
writed into the program directory: but everyone of us have different
"installation".

BR
Luigi Ferraris

Massimo Belgrano

unread,
May 12, 2014, 5:01:47 AM5/12/14
to qtcon...@googlegroups.com
As Pritpal posted here, you can resolve this problem by downloading the attached qwindow.dll and do the following:

1. Create a sub-folder "platforms" in {QtContribInstalldrive}:\hb32(orWhateverYouChooseItToBe)\bin folder.
2. Copy downloaded from here qwindow.dll into "platforms" folder.
3. Run HbIDE | HbDBU.

qwindows.dll




--
You received this message because you are subscribed to the Google Groups "QtContribs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qtcontribs+...@googlegroups.com.
To post to this group, send email to qtcon...@googlegroups.com.
Visit this group at http://groups.google.com/group/qtcontribs.
For more options, visit https://groups.google.com/d/optout.



--
Massimo Belgrano
Delta Informatica S.r.l. (Cliccami per scoprire 

Luigi Ferraris

unread,
May 12, 2014, 5:05:39 AM5/12/14
to qtcon...@googlegroups.com
Il 12/05/2014 11.01, Massimo Belgrano ha scritto:
As Pritpal posted here, you can resolve this problem by downloading the attached qwindow.dll and do the following:

1. Create a sub-folder "platforms" in {QtContribInstalldrive}:\hb32(orWhateverYouChooseItToBe)\bin folder.
2. Copy downloaded from here qwindow.dll into "platforms" folder.
3. Run HbIDE | HbDBU.

qwindows.dll

Hi Massimo, dll and plugins are related with Qt version you have used to "build" QtContribs.
Anyway, you can take them from your Qt installed package. And they can be more then 1 or 2 (ie Qt5Core.dll, Qt5Gui.dll, etc, etc).

BR
Luigi Ferraris

Dušan D. Majkić

unread,
May 12, 2014, 5:09:31 AM5/12/14
to qtcon...@googlegroups.com
> Copy downloaded from here qwindow.dll into "platforms" folder.

I did that, and it will not work.

HBDBU work fine if I copy it to the Qt5.3/mingw482_32 /bin

Will investigate more.

Luigi Ferraris

unread,
May 12, 2014, 5:25:03 AM5/12/14
to qtcon...@googlegroups.com
Il 12/05/2014 11.09, Dušan D. Majkić ha scritto:
 Copy downloaded from here qwindow.dll into "platforms" folder.
I did that, and it will not work.

HBDBU work fine if I copy it to the Qt5.3/mingw482_32 /bin

Will investigate more.
IMHO, no! You can mix wrong dll
in your hbdbu program folder:
1) create a folder plugins and put here ( copy from YOUR Qt ) folders: iconengines, imageformats, platforms, printsupport (someone can be uneseful, it depend)
2) copy ( copy from YOUR Qt ) these dll
icudt51.dll
icuin51.dll
icuuc51.dll
libgcc_s_dw2-1.dll
libstdc++-6.dll
libwinpthread-1.dll
Qt5Core.dll
Qt5Gui.dll
Qt5Multimedia.dll
Qt5MultimediaWidgets.dll
Qt5Network.dll
Qt5OpenGL.dll
Qt5Positioning.dll
Qt5PrintSupport.dll
Qt5Qml.dll
Qt5Quick.dll
Qt5Sensors.dll
Qt5Sql.dll
Qt5WebKit.dll
Qt5WebKitWidgets.dll
Qt5Widgets.dll
Someones can be unuseful anyway you can custom after

and run the program

BR
Luigi

Dušan D. Majkić

unread,
May 12, 2014, 5:29:53 AM5/12/14
to qtcon...@googlegroups.com
> Will investigate more.

I compiled Validator.hbp from qtwidgets/test.
With latest latest Qt 5.3 (MinGw4.82 - OpenGL)
only those dlls are needed. (No need for platform plugin!)

Validator.exe depends on and works with:

Qt5Core.dll
Qt5PrintSupport.dll
Qt5Widgets.dll
Qt5Gui.dll
libstdc++-6.dll
libwinpthread-1.dll
libgcc_s_dw2-1.dll
icudt52.dll
icuin52.dll
icuuc52.dll

If I copy those dlls to qtcontribs/bin dir - everything works!

This Qt version is without ANdroid. It could be some Android related
issuse (like OpenGL). I am downloading Android version to check
that also.

Luigi Ferraris

unread,
May 12, 2014, 5:36:55 AM5/12/14
to qtcon...@googlegroups.com
Il 12/05/2014 11.29, Dušan D. Majkić ha scritto:
> If I copy those dlls to qtcontribs/bin dir - everything works!
As I write in my first post. dlls and plugins are related (more or less)
with program requirements.

As I write: to run a QtContribs program you need some / many dlls and/or
plugins. QtContribs don't know what.

IMHO, if you have this tree
.../harbour/addons/....
.../harbour/bin/win/mingw/hbdbu.exe
you must put in the last directory all you need from Qt. For this reason
I write "I don't know how other users can..." run (wihtout these
updates) run hbdbu or hbide

BR
Luigi

Dušan D. Majkić

unread,
May 12, 2014, 5:41:15 AM5/12/14
to qtcon...@googlegroups.com
> I am downloading Android version to check that also.

It also works without platforms plugin.

The Android version is the same as MinGW version (with
added separeate Android binaries).

I tried this:

http://download.qt-project.org/development_releases/qt/5.3/5.3.0-rc/qt-opensource-windows-x86-mingw482_opengl-5.3.0-RC.exe

And this:

http://download.qt-project.org/development_releases/qt/5.3/5.3.0-rc/qt-opensource-windows-x86-android-5.3.0-RC.exe

I guess that this issue willl be resolved with new qtcontribs release.

Dušan D. Majkić

unread,
May 12, 2014, 5:41:18 AM5/12/14
to qtcon...@googlegroups.com
> As I write: to run a QtContribs program you need some / many dlls and/or
> plugins. QtContribs don't know what.

I know that. I compiled validator.exe and put it into separate empty dir.
Then I dependency checked it for dlls it uses.

The dll list I posted makes Validator.exe run fine in separate dir.

No platform dll is needed with Qt 5.3.0 RC

Pritpal Bedi

unread,
May 12, 2014, 4:32:30 PM5/12/14
to qtcon...@googlegroups.com
Hi Dusan


I have no info about Qt has changed "platforms" work.
This is the mistake I did in latest QtContribs installer.

Test it like:

1. Copy in a folder all needed dlls and exe.
2. IMPORTANT: issue SET PATH=
3. Run executable.

Sometimes, when we install Qt, an entry to this effect is made into global env variable list .


Pritpal Bedi

Pritpal Bedi

unread,
May 22, 2014, 8:32:19 PM5/22/14
to qtcon...@googlegroups.com
Hi Dusan


I guess that this issue willl be resolved with new qtcontribs release.


You are right in your experiments.
Requirement for  <platforms> and any other dependency has been resolved.
I can run HbIDE, etc from a stand-alone folder without any path(s) set, just keeping 
the Qt5{required}.dll(s) and the executables together, without any issues.
It is a good news.


Pritpal Bedi

Pritpal Bedi

unread,
May 22, 2014, 8:34:55 PM5/22/14
to qtcon...@googlegroups.com
Hi Dusan

Can you provide a light-weight Qt dll's without icu*.dll(s)  ?


Pritpal Bedi
a student of software analysis & concepts

Luigi Ferraris

unread,
May 23, 2014, 3:21:05 AM5/23/14
to qtcon...@googlegroups.com
Il 23/05/2014 2.32, Pritpal Bedi ha scritto:
> You are right in your experiments.
> Requirement for <platforms> and any other dependency has been resolved.
> I can run HbIDE, etc from a stand-alone folder without any path(s)
> set, just keeping
> the Qt5{required}.dll(s) and the executables together, without any issues.
> It is a good news.
>
>
> Pritpal Bedi
AFAIK this is the standard raccomended by Qt.
But you can play using qt.conf or using pathLibraries (or ... setting
path) to have a unique (shared) dlls repository that can be -very-
different from Qt installation.

BR
Luigi Ferraris

CarozoDeQuilmes

unread,
May 23, 2014, 11:27:25 AM5/23/14
to qtcon...@googlegroups.com
Hi Pritpal, congratulations!

Question: I read about plugins and I understand that platform plugins can be loaded by 5 methods:

1.- from hard coded path into Qt5Core
2.- from <exeFolder>\plugins\platform
3.- from path specified into "qt.conf" plus "\platform" string
4.- from path specified in QT_QPA_PLUGIN_PATH environment variable plus "\platform" string
5.- from path added to QCoreApplication class

but, with these methods isn't possible to load plugins from <exeFolder> (I can be wrong!)
How you did to achieve this behavior?

Thanks in advance
CdQ
 


--
You received this message because you are subscribed to the Google Groups "QtContribs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qtcontribs+...@googlegroups.com.
To post to this group, send email to qtcon...@googlegroups.com.
Visit this group at http://groups.google.com/group/qtcontribs.
For more options, visit https://groups.google.com/d/optout.



--
CdQ

Pritpal Bedi

unread,
May 23, 2014, 12:01:10 PM5/23/14
to qtcon...@googlegroups.com
Hi


1.- from hard coded path into Qt5Core
2.- from <exeFolder>\plugins\platform
3.- from path specified into "qt.conf" plus "\platform" string
4.- from path specified in QT_QPA_PLUGIN_PATH environment variable plus "\platform" string

Define as such and use.

 
5.- from path added to QCoreApplication class

Is not possible in HbQt as we initialize QApplication and cannot set anything before Qt initializes.



# 2, if one needs them. This is the safest way.


Pritpal Bedi

Pritpal Bedi

unread,
May 23, 2014, 12:03:50 PM5/23/14
to qtcon...@googlegroups.com
Hi


A mistake in previous post.


exePath\platforms  
exePath\imageformats


When inside exePath, these reside in designated folders without need of upper level "plugins" folder.


Pritpal Bedi

CarozoDeQuilmes

unread,
May 23, 2014, 1:26:05 PM5/23/14
to qtcon...@googlegroups.com
Hi Pritpal,

Then..... we need to copy plugins subfolders when we move an executable from a folder to another?

Regards
CdQ


--
You received this message because you are subscribed to the Google Groups "QtContribs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qtcontribs+...@googlegroups.com.
To post to this group, send email to qtcon...@googlegroups.com.
Visit this group at http://groups.google.com/group/qtcontribs.
For more options, visit https://groups.google.com/d/optout.



--
CdQ

Luigi Ferraris

unread,
May 23, 2014, 1:33:51 PM5/23/14
to qtcon...@googlegroups.com
Il 23/05/2014 19.26, CarozoDeQuilmes ha scritto:
> Hi Pritpal,
>
> Then..... we need to copy plugins subfolders when we move an
> executable from a folder to another?
>
> Regards
> CdQ
>
Hi CarozoDeQuilmes,
in a very little brief answer: yes. But.... you can use qt.conf to
create your sharedDLL directory on your PC and using them for several
program. I never test on a Local Area Network shared directory.

BR
Luigi Ferraris

Pritpal Bedi

unread,
May 23, 2014, 3:49:30 PM5/23/14
to qtcon...@googlegroups.com
Hi


Then..... we need to copy plugins subfolders when we move an executable from a folder to another?


Unfortunately yes.
If you find some other solution, let us know.


Pritpal Bedi

CarozoDeQuilmes

unread,
Jun 3, 2014, 9:47:57 AM6/3/14
to qtcon...@googlegroups.com
Hi Pritpal, a solution is possible, I implemented a similar solution for imageformats in marinas-gui, the different is that imageformats are loaded at QApplication but platforms plugins are loaded at QCoreApplication (I know that hbqt isn't based in QCoreApplication).

I generate an automatic source to embedded all dll into marinas-gui library and when application start, marinas-gui check that folder ${TEMP}/__mg_plugins_${marinas-gui_version}_${qt_version} exists and if not, marinas-gui create it and extract dll's (or .so for linux) into folder
Then, marinas-gui add the folder to QApplication object with the addLibrary method.

You can achieve a similar solution making source for embedded dll's at hbqt make time, but you need to implement the QCoreApplication class, and use the addLibrary method of QCoreApplication class at hbqt initialization time.  (according with this article: http://www.tripleboot.org/?p=536 at section "Specifying the plugin path in your code")

Note: you can use a variable like QT_EMBEDDED_PLATFORMS_PLUGINS to enable/disable feature at make time

It is only an idea.

Regards
CdQ

 




--
You received this message because you are subscribed to the Google Groups "QtContribs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qtcontribs+...@googlegroups.com.
To post to this group, send email to qtcon...@googlegroups.com.
Visit this group at http://groups.google.com/group/qtcontribs.
For more options, visit https://groups.google.com/d/optout.



--
CdQ

Pritpal Bedi

unread,
Jun 3, 2014, 12:53:02 PM6/3/14
to qtcon...@googlegroups.com
Hi


You can achieve a similar solution making source for embedded dll's at hbqt make time, but you need to implement the QCoreApplication class, and use the addLibrary method of QCoreApplication class at hbqt initialization time.  (according with this article: http://www.tripleboot.org/?p=536 at section "Specifying the plugin path in your code")

Note: you can use a variable like QT_EMBEDDED_PLATFORMS_PLUGINS to enable/disable feature at make time
 

Nice and well written artical, thank you for locating.


It is only an idea.


And a good one though. It should be easy, but bow such path will 
be known to HbQt at the run-time ?

You mean to check such path pointed to by env variable :
QT_EMBEDDED_PLATFORMS_PLUGINS  ? or what ?


Pritpal Bedi

CarozoDeQuilmes

unread,
Jun 3, 2014, 2:06:30 PM6/3/14
to qtcon...@googlegroups.com
Hi Pritpal,


>> And a good one though. It should be easy, but bow such path will
>> be known to HbQt at the run-time ?

You can use getEnv( "TEMP" ) for windows and "/tmp" for UNIX to make a folder to extract the platforms plugins

e.g:

#if definde( __PLATFORM__WINDOWS )
   cPlatformsPluginsFolder := getEnv( "TEMP" ) + hb_ps() + "__platforms_plugins_" + hbqt_version() + "_" + HbQt_Qt_Version_Str()
#elif defined( __PLATFORM__UNIX )
   cPlatformsPluginsFolder := "/tmp" + hb_ps() + "__platforms_plugins_" + hbqt_version() + "_" + HbQt_Qt_Version_Str()
#else
   #error Platform Error for folder plugins
#endif
IF !hb_dirExists( cPlatformPluginsFolder )
   dirCreate( cPlatformPluginsFolder )
   --> extract binaries files to cPlatformPluginsFolder // only extract the first time
ELSE
   --> you can add extra controls for files (dll's or so's) exists
ENDIF
oCoreApplication:addLibrary( cPlatformPluginsFolder )

>> You mean to check such path pointed to by env variable :
>> QT_EMBEDDED_PLATFORMS_PLUGINS  ? or what ?

No, it is for not include this automatic mechanist into hbqt library (at hbqt make time), because platforms plugins occupy 1.5MB.
Then, if QT_EMBEDDED_PLATFORMS_PLUGINS=NO is specified, platforms plugins should be managed manually outside exe

Note: you can use:

FUNCTION hbqt_getTempFolder()
RETURN QStandardPaths():writableLocation( QStandardPaths_TempLocation )

instead of getEnv() and "/tmp", but I think that at QCoreApplication point, the QStandardPaths class wasn't initialized (maybe)

Regards
CdQ


--
You received this message because you are subscribed to the Google Groups "QtContribs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qtcontribs+...@googlegroups.com.
To post to this group, send email to qtcon...@googlegroups.com.
Visit this group at http://groups.google.com/group/qtcontribs.
For more options, visit https://groups.google.com/d/optout.



--
CdQ

Luigi Ferraris

unread,
Jun 4, 2014, 8:32:04 AM6/4/14
to qtcon...@googlegroups.com
Il 03/06/2014 20.06, CarozoDeQuilmes ha scritto:
> No, it is for not include this automatic mechanist into hbqt library
> (at hbqt make time), because platforms plugins occupy 1.5MB.
> Then, if QT_EMBEDDED_PLATFORMS_PLUGINS=NO is specified, platforms
> plugins should be managed manually outside exe
Hi friends,
please, do not add another envar setting at make time.... we already have:
HB_WITH_QT
HB_QTPATH
HB_QT_MAJOR_VER
QTCONTRIBS_REBUILD

At least IF QT_EMBEDDED_PLATFORMS_PLUGINS is settled or is
QT_EMBEDDED_PLATFORMS_PLUGINS=yes means "platforms plugins are
internally managed" ELSE (by default) "platforms plugins are managed
manually outside exe".

Luigi Ferraris

Guillermo Varona Silupú

unread,
Oct 22, 2017, 11:24:26 PM10/22/17
to QtContribs
Hi:

I have been testing the examples of HbQT (folder C: \hb32_qt|addons\hbqt\teststs), for which I have used HbIDE.
For example, I have generated the ideui. hbp EXE.
I made some modifications in 2 lines of dbstruct. prg to make it work:

. . .

   oStruct := hbqtui_dbstruct()   //:new()
   //oStruct:create()
. . .

HbIDE generates the EXE correctly for me, but when I run it in the C: \hb32_qt|addons¡hbqt\teststs folder, I get this:

I've reviewed and done everything in this thread:
https://groups.google.com/forum/#!msg/qtcontribs/-MMicXrExjQ/wlKBpEM7fp0J;context-place=forum/qtcontribs

but I haven't been able to solve the problem.

Now, I copy the EXE into the C:\hb32_qt\bin folder and it works fine, what could be the problem?

Any help is welcome.

TIA

BR

GVS


Auto Generated Inline Image 1
Reply all
Reply to author
Forward
0 new messages