Packaging the Qt 5.7 Virtual keyboard example on Surface Pro tablet - c++

I have run the Qt Virtual Keyboard example successfully with Qt 5.7 in Qt Creator on Windows 10 desktop, but if I try to run the same exe on Windows Surface Pro (running on Windows 10) by including all necessary dlls and plugins, I am just getting the QML lineedits, but the keyboard is not popping up and the application just hangs. The exe isn't telling what else it requires to make it run.
The package I created is here:

Related

Cannot run the program in the Qt Creator environment

My Qt Creator Verison is 5.15.2 (MSVC 2019 64bit) And I want using Qt 6.2 rc
Now I have a project that can be compiled normally but cannot run in the Qt Creator environment.But I manually run this program in Explorer, it can work normally. That is to say, Qt Creator built it but this software cannot be debugged in Qt
By the way, this project can run normally when it is newly created. Then I introduced spdlog and sql related libraries in this project (but not used), and after adjusting the directory structure, it cannot be used in Qt Creator.
Console Output:
17:06:23: Starting E:\Code\Clion\CadenceLibQML\CadenceLibQML\build-CadenceLibQML-Desktop_Qt_6_2_0_MinGW_64_bit-Debug\CadenceLibQML.exe ...
17:06:23: The program ends abnormally
17:06:23: The process was ended forcefully.
17:06:23: E:\Code\Clion\CadenceLibQML\CadenceLibQML\build-CadenceLibQML-Desktop_Qt_6_2_0_MinGW_64_bit-Debug\CadenceLibQML.exe crashed.

QStrings not showing when debugging with Qt Creator on Windows

I'm debugging a Qt 5.5 application with Qt Creator on Windows 10 using MSVC 2013 compiler.
CDB Debugger is set up in Qt Creator and I can start the debug session. However variable contents of Qt objects (QStrings...) can not be inspected, I just get the memory location, size etc.
I expect I'm missing for debugging helpers or the debugger extension mentioned here.
Any clues what to do?
I temporarily deleted qtcreatorcdbext.dll, started debugger (forcing to diplay an error) and moved the dll back. Now everything works.
It seems there was a problem with the setup procedure, maybe because debugging tools were installed after Qt Creator.
I had to update qtcreatorcdbext.dll in /lib/qtcreatorcdbext32 folder. My Qt creator installed separatly from the Qt pack so I copied the dll from the Qt installation/tools/qtcreator/lib/qtcreatorcdbext32 to the separatly installed qtcreator

Crash on exit in qt5winextras.dll Windows XP 32

GUI widgets(c++) application is built with the latest Qt Creator, Qt 5.4.1 MinGW SDK(qt-opensource-windows-x86-mingw491_opengl-5.4.1.exe) on Windows 8.1 x64
PRO file:
QT += core gui network winextras
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
Everything is by defaults, no special settings. App runs and works on Windows XP x86 SP3 but when closed it crashes giving a generic windows "Send error to Windows" dialog.
Windows Logs show that the crash occured at qt5winextras.dll version 5.4.1.0 adress 0x00008009
Doesn't crash on Windows 7 and 8.1
Can this be Qt bug? How to fix this?
Updated
My code was similar to musicplayer example. I've compiled the musicplayer Qt's example and it also crashes.
Qt5.4.1\Examples\Qt-5.4\winextras\musicplayer
Also, musicplayer doesn't play music on Windows XP 32
I had a similar problem.
I think you should exec code (which related with winexras) only if windows version greater than XP.
I did something like this:
if(QSysInfo::windowsVersion >= QSysInfo::WV_VISTA)
{
taskbarButton = new QWinTaskbarButton(this);
taskbarButton->setWindow(windowHandle());
taskbarProgress = taskbarButton->progress();
connect(positionSlider, SIGNAL(valueChanged(int)), taskbarProgress, SLOT(setValue(int)));
connect(positionSlider, SIGNAL(rangeChanged(int,int)), taskbarProgress, SLOT(setRange(int,int)));
}

Qt Application showing back content

I'm developing an Qt Quick Application with C++ and QML.
The mainwindow doesn't show the content, and shows part of the back window content(the QT IDE)
The problem is when running the project in Debug/Release(both) mode. Running the binary from the project folder works. But I need to test it from debug mode.
I'm using Ubuntu 14.04 (Xfce).
How can I solve it?

Qt 5.2.0 The camera service is missing

I have a Logitech HD Webcam C270.
I want to write a simple webcam application and so I tried to compile the Qt camera example (Qt\Qt5.2.0\5.2.0\msvc2010_opengl\examples\multimediawidgets\camera).
My dev system is a Windows 7 x64 SP1 Virtual Machine. If the webcam is connected to this VM the example runs very well. Qt and the windows device manager detect the webcam as "USB Video device".
When I try to run the compiled binary on my non-virtual system (which is also Win7 x64 SP1) the application says "the camera service is missing" (yes, I disconnected the camera from the virtual machine). On this system the camera is detected as "Logitech HD Webcam C270
"
I also have a second notebook with Win7 x64 SP1 - same problem here.
When I test the webcam with another tool (dorgem.cvs.sourceforge.net/viewvc/dorgem/Dorgem/) I can see, that the webcam works.
What can I do to resolve the problem?
Am I missing some library or 3rd party tool? Qt isn't installed on my "real" systems.
I copied all DLLs the application complained about to the same directory as the exe file:
icudt51.dll
icuin51.dll
icuuc51.dll
Qt5Cored.dll
Qt5Guid.dll
Qt5Multimediad.dll
Qt5MultimediaWidgetsd.dll
Qt5Networkd.dll
Qt5OpenGLd.dll
Qt5Widgetsd.dll
platforms/qwindowsd.dll
Thanks to FrankOsterfeld. He pointed me in the right direction.
I had to copy the following files from Qt to my app dir:
Qt5.2.0\5.2.0\msvc2010_opengl\plugins\mediaservice\dsengined.dll
Qt5.2.0\5.2.0\msvc2010_opengl\plugins\mediaservice\qtmedia_audioengined.dll
Qt5.2.0\5.2.0\msvc2010_opengl\plugins\mediaservice\wmfengined.dll
Desination
MyAppDir\MyApp.exe
MyAppDir\(files from original post)
MyAppDir\mediaservice\dsengined.dll
MyAppDir\mediaservice\qtmedia_audioengined.dll
MyAppDir\mediaservice\wmfengined.dll
This links helped me to find the soloution:
Deploying Qt application using QtMultimedia in release mode
http://qt-project.org/doc/qt-5.0/qtdoc/deployment-windows.html#creating-the-application-package
"In contrast to user plugins, Qt plugins have to be put into subdirectories matching the plugin type. As we want to deploy the windows platform plugin it has to be put into a "platforms" subdirectory."