Qt5.1.1 drag and drop problem
-
It took a few hours to build Qt 5.1.1 from source. When I loaded it into VS2012, it always complains about OpenGL problem, even if I included "include/QtANGLE".
error C2065: 'GL_RGBA8' : undeclared identifier c:\qt\qt5.1.1\qtbase\src\gui\opengl\qopenglframebufferobject.h
error C2065: 'GL_RGBA8' : undeclared identifier c:\qt\qt5.1.1\qtbase\src\gui\opengl\qopenglframebufferobject.h
error C2039: 'glClearDepth' : is not a member of 'global namespace'' c:\qt\qt5.1.1\qtbase\src\gui\opengl\qopenglfunctions.h error C3861: 'glClearDepth': identifier not found c:\qt\qt5.1.1\qtbase\src\gui\opengl\qopenglfunctions.h error C2039: 'glDepthRange' : is not a member of '
global namespace'' c:\qt\qt5.1.1\qtbase\src\gui\opengl\qopenglfunctions.h
error C3861: 'glDepthRange': identifier not found c:\qt\qt5.1.1\qtbase\src\gui\opengl\qopenglfunctions.hWhen I built Qt from source, I used "-opengl desktop" option. And it seems outside VS2012, it did not complain OpenGL.
-
I also reinstall VS 2012 without SP. This time qt-windows-opensource-5.1.1-msvc2012-x86-offline.exe installs without any error messages. However, dropsite still does not work.
Now I am wondering if drag and drop really works in 5.1.1 or not. :(
-
Have to roll back to Qt 4.8.1. Everything works. Too bad.
-
What did you drop on the widget ? I've just tested the dropsite example again (still with MinGW) and dropped a couple of files on it and its working.
-
I dropped a file from file explorer. Also multiple files worked.
Now I am wondering if there is some dll corrupted or incompatible with Qt in my Windows 7 system. Is there any way to ensure all dependent dlls have proper version?
-
You can try Dependency Walker on your executable. If it can find Qt libraries it means that there's a set of them on your system in your PATH that might be interfering
-
Thank for the tip!
Finally I found out my firewall blocks some access permission of the compiled binaries. After adding the binaries into exception list, it works fine if I compiled using command line tools (qmake, jom).
The version I am using now is
- qt-windows-opensource-5.1.1-msvc2012_opengl-x86_64-offline.exe
- qt-vs-addin-1.2.2-opensource.exe.
I assume I should not use QtANGLE lib. In VS2012, I tried to remove preprocessor definition "QT_OPENGL_ES_2" and "QT_OPENGL_ES_2_ANGLE", and compile the code. Now I got error:
LNK1104: cannot open file 'libEGLd.lib'
Could you give some hint how I can solve this problem? I tried to search the forum, but no luck.
-
Also according to makespecs/win32-msvc2012/qmake.conf, the error message means QMAKE_LIBS_OPENGL_ES2_DEBUG was used for linking. However, I would expect QMAKE_LIBS_OPENGL should be used.
-
Indeed, there might be a packaging or naming issue, did you try the angle package ?
-
There is no include/QtANGLE directory in the installed directory. Could you let me know how I can try angle package?
-
BTW, I did see GL lib files defined by QMAKE_LIBS_OPENGL under C:\Program Files (x86)\Windows Kits\8.0\Lib\win8\um\x86 and C:\Program Files (x86)\Windows Kits\8.0\Lib\win8\um\x64. Not sure how I can force to link against QMAKE_LIBS_OPENGL.
QMAKE_LIBS_OPENGL = glu32.lib opengl32.lib gdi32.lib user32.lib
-
Are you sure you are using the OpenGL Qt version ? Did you uninstall the other versions before installing that one ?
-
Yes, I have uninstalled previous versions and even deleted the leftover directories.
After installation, qt-windows-opensource-5.1.1-msvc2012-x86_64-offline.exe has QtANGLE directory, while qt-windows-opensource-5.1.1-msvc2012_opengl-x86_64-offline.exe hasn't.
I assume qt-windows-opensource-5.1.1-msvc2012_opengl-x86_64-offline.exe is the OpenGL Qt version. And that is the one I installed.
-
Indeed, if the name doesn't contain OpenGL it's an ANGLE build