QMovie animated gif functionalty is not working on windows systems - c++

I am using QMovie functionality in SystemTrayIcon. ie, rotating the gif files on the top of TrayIcon.
This works fine if I compile the source code on Qt 4.7.0/Windows versions.
But the same code is not working with Qt 4.6.3 build version which deployed on the client machines. It seems some plugins are missing.
I used QMovie::start() and QMovie::stop() slots.
I tried copying the Qt 4.7 DLL (QtCore4.dll) to the Qt 4.6.3 built binaries. But this didn't work.

A lot of things in QMovie changed with the 4.7 release, a lot of bug fixes and a few new popped up.
If you need this feature you'll need to upgrade to 4.7 or newer.

Related

Do QT based GUI applications work in Windows PE?

I tried running a QT C++ GUI sample in WinPE. It should just open an empty window.
It complains about missing d3d11.dll and dxgi.dll.
QT tries to use OpenGL, if there is no suitable driver, it uses DirectX with ANGLE. I tried removing the DirectX dependency by calling Qapplication::setAttribute(Qt::AA_UseSoftwareOpenGL) before the Qapplication instantiaton. No change, still requires those two dlls.
I tried to copy those two files from my regular Windows, and now the error is: “The procedure entry point CheckIsMSIXPackage could not be located in the dynamic link library dxgi.dll”
I don't need any HW acceleration, how could I make it run?
QT version: 5.14.2 (dynamic linking)
WinPE version: Windows 10 2004
Compiler: Visual Studio 2019 and Mingw 8.1 (I have tried both, same results)
Too late ? Not the solution but only an idea.
Actually I use Winpe WinPe 2009. When i install VirtualBox 6.1.16 in this winpe, i add opengl32.dll and other files. VirtualBox uses QT5 files. And i get the same error. With Depends.exe, i see that opengl32.dll needs this ChechIsMSIXPackage and loock for it in kernelBase.dll. But because kernelBase.dll which comes with winpe2009 doesn't contain this API, i take this kernelBase.dll from a normal W10 (in the ISO/Install.wim). And, in my case, virtualBox works well, QT5 also, opengl32 also.
Qt 5.12 does not depend on dxgi.dll but Qt 5.15 definitely seems to.
One option is to roll back your project to Qt 5.12, I can personally confirm that Qt 5.12 projects work great under Windows PE.
(This is assuming you are using the prebuilt Qt binaries from Maintenance Tool - otherwise there may be a config option to recompile Qt to avoid this).
It's late but since I just ran into this problem myself...
Apparently this dependency is introduced by the Rendering Hardware Interface, and what worked for me for WinPE 1809 was to build Qt 5.15 (.7 and .8) from source - in Msys2, by the way - after removing/commenting out the line include(rhi/rhi.pri) in qtbase/src/gui/gui.pro, and the configure command line includes -no-directwrite -no-opengl -no-icu.

ANGLE use in Qt.5.9.1

In our project we switched from the Qt-Version 5.5.0 to 5.9.1
We are running Software, that runs partially on virtual machines with OpenGL 1.1 (standard I think). With Qt5.5 everything went fine and ANGLE mapped to DirectX correctly.
Since we are using Qt5.9.1, the OpenGL windows doesn't behave like they should, you can see the behaviour in the picture.
Difference Qt5.5 and Qt5.9.1
Is their a bug in the new Qt-version or am I missing something?
Would it change something if we build Qt5.9.1 again with configure -opengl dynamic?
P.S.: We changed from Visual Studio 2013 to 2015, but I don't think that this matters.
I had this problem as well and I solved it by compiling a newer version of angle and putting it right next to your exe. Can't run them correctly in QtCreator though (must deploy and then copy).

OpenCV not working correctly in Qt debug mode

I am working with OpenCV 2.4.9 under Windows 8.1 x64. I am trying to run basic operations like image reading, webcam streaming, etc. I've configured OpenCV to work with VS and QtCreator.
In both cases I use precompiled binaries from the x64/vc12 OpenCV folder, built with the VC compiler version 12.0. In Visual Studio everything works great in both release and debug modes, but in Qt Creator only release mode works correctly while in debug mode I encounter strange bugs like: wrong windows titles, imread not working correctly, bad video streaming.
In Qt Creator I use the same compiler as in VS, namely vc12. I've setup the library paths correctly and am using debug version of libs for debug and appropriate ones for release.
The problems only arise when I am using C++ API in OpenCV, everything works fine if I am using the C API.
I've seen problems like mine arise regularly one, two, three, but none of those solutions solve my problem.
UPDATE: Problem solved, see the answer below.
Problem solved!
It was in the Qt Creator's qmake, it did not correctly update the Makefile that it generates. So, instead of debug versions of the libraries, the release versions were used, but the .pro file in the project showed just the opposite.

C++ Qt Creator version recommended for Qt libraries 4.8.5

I've downloaded the Qt libraries 4.8.5 and compiled them with MinGW GCC 4.8.2 and now I would like to use Qt Creator to design the interface of my applications in an interactive way. What version of Qt Creator version is recommended for use with Qt libraries version 4.8.5 and where I can get that specific version. Or can I go with the latest version Qt Creator 3.0.1 for Qt libraries 5.2.1? I'm thinking that the latest version of Qt Creator might use features that are not supported by the 4.8.5 version of Qt libraries.
If you're using the Qt Designer tab of Qt Creator to create "forms" (.ui files) then that part of Qt has been stable for quite some time, and was not changed significantly as far as I know in Qt 5.x so you should be fine with the latest version of Qt Creator.
The QML language has undergone significant changes from 4.x to 5.x and there might be issues using the latest Qt Creator's designer tab to visually edit "Qt Quick" (QML files). Certainly the very latest version of Qt Creator features much more extensive QML support, including QML debugging.
If this talk of QML versus UI files is a mystery, then you'll need to read up on the two technologies and make a decision which to use; but essentially if you're set on 4.8.x that probably means using the older UI files. I use these myself and they're fine for traditional desktop applications.
Qt Quick 2 in 5.x is very nice, and enables animated, modern, styled user-interfaces with a powerful scripting language and bindings through to C++, however there is more to master going down that route, and it would mean using Qt 5.x.
I would recommend using Qt 5.2.1. You are certainly wrong here
I would go with Qt 5 but that library is huge and applications that
use it eat allot of memory at runtime
Instead in Qt5 it is more modularised and better and has more classes. If you compile Qt 4.8.5 for static compilation, and same with Qt 5.2 (with opengl enabled and icu & webkit disabled during compilation) the difference in size of binaries created is less than 1MB, the total size of skeleton app is around 6MB.
It is same in case of dynamic linking where the difference in memory consumption of both is almost same (around 15MB) for skeleton app.

Qt C++ QWebView image quality

I notice, that some image on webpage has bad quality (sharp corners, no anti-aliasing). I use Qt 4.7.4. This bug not found in Qt 4.8.0 RC1 (I've tested, all OK). How to remove this bug?
Update: examples
http://piccy.info/view3/2305599/c2991408a666393dd49bbcc938ad2f9f/ - Qt 4.7.4
http://piccy.info/view3/2305604/9ac2408088af261edef3b852c4127414/ - Qt 4.8.0 RC1
On webpage images in jpeg. Can I remove this effects?
If it's resolved in Qt 4.8.0 you have two options, upgrade to it either as the RC (which for a production app is risky)/ wait until 4.8 is production ready (soon-ish) or my personal favourite which is pull QtWebKit 2.2 into your development environment. It's not straight forward, but you'll find that it's doable.
Or backport the fix for it, which will be probably more difficult than integrating 2.2 into your build.