How to make the numpad work in Qt 5.14.1? - qt

I was working for quite a while with Qt5 5.9.8 and updated to the latest release Qt5 5.14.1. I built Qt 5.14.1 with exactly the same flags as the 5.9.8 version and everything seemed to be working fine except for one issue: It is impossible to enter numbers with the numpad.
This issue has nothing to do with the applications I write with Qt but is somehow Qt inherent. It is also present in the Qt designer as well as in ParaView which I compile with the my compiled Qt version.
Is there anything I can do to compile Qt to make the numpad work again?

The same bug report that Frank Osterfeld mentioned lead me to the solution of this problem. The issue was a missing xkb dependency. After a yum install libxkbcommon libxkbcommon-devel Qt5 is built and the numpad is working as expected.
The difference can be inspected in the configure output. Without libxkbcommon libxkbcommon-devel:
XCB:
Using system-provided XCB libraries .. no
XCB XKB .............................. no
XCB XInput ........................... yes
and with libxkbcommon libxkbcommon-devel:
XCB:
Using system-provided XCB libraries .. no
XCB XKB .............................. yes
XCB XInput ........................... yes

Related

How to fix: "line: 1; Qt Quick emulation layer crashed

The Problem
I cannot stress this enough but I have looked as far as I can over the internet for a solution and either they didn't have a solution or all they did was add a support ticket. The problem is that after creating a python qt quick application I try opening the QML file but when I go to the design tab it give me this error:
Code
The Designer is very finicky and can crash for various reasons. I've had success seeing the actual errors causing this dialog by launching Creator from the command line with debugging enabled:
QT_LOGGING_RULES="qtc.nodeinstances.init.debug=true" "/Applications/QtCommercial/Qt Creator.app/Contents/MacOS/Qt Creator"
That's specific to macOS but the like approach should work on any OS.
Look for error messages related to "Puppet". That's the name of the subprocess that actually renders the QML for Designer.
You can also go to Preferences -> Qt Quick -> QML Emulation Layer and try the opposite of the current setting and see if it works any better.
The solution that works for me is as follows:
OS: windows 10
Go to Tools >> Options >> Qt Quick >> (tab) Qt Designer
In the "Use fallback QML emulation layer", you see the placeholder path there. Switch it to C:\Qt\Tools\QtDesignStudio\bin or use browse if you have a different install location for Qt such that path\to\QtDesignStudio\bin
Boy do I have a FIX for you guys. I had been screwing around with this same issue to no avail, until I came across an error that wouldn't let me download qt3d (something) and I know that was part of the installation choices so I decided to uninstall everything. A thing to note when uninstalling: the Maintenance Tool doesn't uninstall everything. There were still Qt files located in C:\Users\user\AppData\Roaming I needed to delete those. Also, I needed to go into the Registry Run >>> Regedit >>>> Edit >>> Find >>> then search for Qt and that brought up all of the QT keys that still remained. I just deleted them one by one. For the Reinstall I practically installed everything (within reason) here's the list of my installation selections. Happy Hunting Fellow Qt'errr's!
Qt 5.15.2
Web Assembly
MSVC 2015-64BIT
MSVC2019-32BIT
MSVC2019-64BIT
MinGW 8.1.0 32BIT
MinGW 8.1.0 64BIT
UWP ARMv7 (MSVC 2015)
UWP x64 (MSVC 2015)
UWP ARMv7 (MSVC 2019)
UWP x64 (MSVC 2019)
UWP x86 (MSVC 2019)
Android
SOURCES
Developer and Designer Tools
Qt Creator 4.15.1 CDB Debugger Support
Debugging Tools for Windows
Qt Creator 4.15.1 Debug Symbols
Qt Creator 4.15.1 Plugin Development
Qt 3D Studio 2.8.0
-MinGW 8.1.0 32BIT
MinGW 8.1.0 64BIT
Qt 3D Studio OpenGL Runtime 2.8.0
MinGW 7.3.0 64Bit
Qt Installer Framework 4.1
Cmake 3.19.2 32bit
Cmake 3.19.2 64bit
Ninja
License: I chose L GPL
I chose Cmake not qmake
Graphic drivers were the issue in my case. Try updating or changing them.
Maybe that your Direct3D driver seems to have issues with Qt.
The error can be avoided by defining:QT_OPENGL=software in the Windows environment.
Assuming the root cause is the display driver of your computer.
Please reference:
https://bugreports.qt.io/browse/QTCREATORBUG-23455

QT Webkit with DirectFB

I have QT 5.5 & QTWebkit and am trying to bring it up on i686 platform.
Everything builds fine , but QTWebkit seems to be configured by default with eglfs. It always try to load egfs plugin instead of directfb.
I tried with the below configuration,
In ./configure -directfb -no-eglfs -no-opengl respectively. It does not generate eglfs plugin, Now i got error saying that there's no eglfs plugin found. How to tell QT to load directfb plugin instead of eglsfs.
Any inputs?
Cheers
Solved the issue by setting QT_QPA_PLATFORM to 'directfb'.

How to create QT version for arm-linux-generic-elf-32

In my debian linux (with i386 processor).i installed QT creator thats works fine.Also i installed G++ cross compiler to run over another system which is having Debian linux with ARM processor.
Now in QT creator "Tools->Options->Build&Run-->Compilers" i added G++ compiler thats also using "Add" option that also fine.
Now in QT creator "Tools->Options->Build&Run-->Kits" i added new Kit with Name as "G++" , device type as "Desktop" , compiler as "G++ (above step added compiler)" thats also fine.
The problem here is in QT version option.In my QT version option having "QT 5.5.0 GCC 64bit" only. If i select that option it is showing the error because G++ compiler is "arm-linux-generic-elf-32 bit".
It is showing the error like , "The compiler G++ (arm-linux-generic-elf-32 bit) cannot produce code for the QT version QT 5.5.0 GCC 64bit (x86-linux-generic-elf-64bit)" .
For me the executable file only enough, no need to run on target directly.
Guide me how to add QT version for arm-linux-generic-elf-32bit
I had similar problem. Finally I found my mistake:
In menu:
QTCreator/Extras/Einstelungen/Compiler
(I guess it is QTCreator/Tools/Setting/Compiler in English.)
I clicked button Hinzufuegen ("Add") and then Benutzerdefiniert ("User defined") and that was wrong. It is to be: CCG!!!!!!!!!!!!!!!!!!!
Afterwards I had to set up also so called ABI to "arm-linux-generic-elf-32 bit"
Then I had a problem with Qt Versionen - it made its own and I could not delete it. So in "Kits" I inserted the new Qt Version.
It works somehow now...
Sort of crazy...
Select your custom kit, change Qt version to None. This is Windows screenshot, but it's same on Linux. If you have Qt version which config corresponds to your kit's compiller you can choose it instead None

Qt Creator - setting up a kit with a cross-compiler

I'm attempting to use Qt creator to cross-compile a project, but have an issue matching the Qt version and my specified compiler toolchain.
I have created a Kit setting up a Device, selecting my toolchain as the compiler (GCC ARM Linux in this case), but I only have a locally installed system Qt (5.0.2 on Mint x86).
Qt Creator understandably tells me the compiler cannot produce code for the Qt version; all the guides I have found suggest using a Qt compiled for the target platform. This doesn't make sense though - it attempts to run qmake compiled for a different architecture and fails
How do I install or configure/compile a Qt version to work with the cross compiler? Maybe I can modify my existing one to understand this setup?
Thanks
This makes absolutely sense. The advice to use a Qt, which is compiled for your target platform is correct. But this does not mean that you use a Qt that was compiled natively on that target platform. You need to use a Qt, which was compiled with a special cross compiler on your host platform for your target platform. This way qmake and other build tools remain executable on your host, but create configurations for your target.
So, if you have a compiler, which can create ARM code, use it to build your Qt. Then you can create a kit in QtCreator out of this compiler/Qt pair.
Greenflow is right. I would like to add some information. I have cross compiled Qt 5.4.1 on Windows having an ARM Linux as target platform. You just need to configure the build properly. Here's what I did:
./configure -platform win32-g++ -xplatform linux-arm-gnueabihf-g++ .....
So Qt tools (qmake,moc,etc...) were built as Windows binaries and all the libraries were built as Linux binaries. Check for the available platforms in qtbase/mkspecs.

Use a LLVM compiled version of Qt

I've seen some mkspec for mac or linux using llvm.
Does anyone use an llvm compiled version of Qt ? Or llvm on their Qt Projects ? does it speed up compilation times ? Is your project faster ?
According to this bug compiling Qt using LLVM is not yet possible.
This is not true - Qt can be compiled via llvm-gcc since version 1.9. clang is currently "almost" able to compile Qt fully. Note that the code of Qt is not sometimes standard-compliant :)

Resources