Keyboard layout switching in Qt, not just in Qt for embedded Linux
-
Simple what are the software architecture you want to use. Until now you wrote that your were using a self-built distribution with a custom kernel and not wanted to use Qt Embedded, but don't have any window manager nor graphic server.
So what would your software stack be ?
-
So all in all quick version: -> kernel -> busybox -> Qt Application ?
-
Well, then Qt for Embedded Linux is the only option. Why did you want to use it in the first place ?
-
Ok, we'll try that.
Assuming you were asking: "Why did you not want to use it in the first place ?"
Well, the project has been running for a few years now, requirements kept changing and keyboard layout switching was added to the specification just recently.I have a question about the tutorial on http://doc.qt.digia.com/4.6/qt-embedded-install.html:
How do I switch between my two Qt versions? I use Qt Simulator for simulations and when compiling our stuff on the hardware, we use a makefile without QtCreator. Do I only have to change $PATH?
If possible I'd like to keep the code working for both versions by using a #compileflag -
Indeed, the was a word missing :D
Just create one kit for each Qt version and use both for you project, then you can switch at will from Qt Creator
-
Ok, but how? Is it enough to choose the corresponding qmake in the "Build Settings/General/Qt Version/Manage"? Qt Simulator doesn't allow me to change that one.
And if I run a shell-script to compile everything together for the hardware, how does the system know which Qt to use if I change it only in QtCreator?
-
Wait, Qt Simulator ? The one from the Nokia time ?
-
Yes, that one, but I can compile it in Desktop mode, too, if I have to. Qt simulator has the advantage of not being fullscreen (because it provides its own virtual screen), so I've used it until now. Though I don't mind abandoning it if it means getting those accursed keyboard layouts to work.
But just switching qmake doesn't make a difference. I followed the tutorial on http://doc.qt.digia.com/4.6/qt-embedded-install.html (but didn't setup the virtual frame buffer), so I'd expect that at least "QKbdDriverFactory::create" shouldn't be an undefined reference anymore. I know that I still need to do some other things to get it to run, like finding out where the QApplication object is that needs to be constructed with the QApplication::GuiServer type, but that shouldn't matter for the compiler, right?
-
Indeed.
What I do when I have to develop for embedded is to build an embedded version for x86 that uses QVFB so I have the same set of libraries than the version from my target.
-
Are you sure you are doing an x86 embedded build ?
If you are using Qt Creator, just switch from one kit to another one. Or if from the command line, use the correct qmake version.
-
The simplest way on the command line is to give the full path to the qmake corresponding to which version of Qt you want to compile with.
On Qt Creator, you have to check your kits.
Have a nice time
-
Hello again,
I had a nice time indeed. I hope you're doing well, too.
I finally tried to tackle Qt for Embedded Linux again, but I got another problem:
I set up a new VM and installed only Qt for Embedded Linux SDK. When I found out that this SDK doesn't include QtCreator, I installed QtCreator version 3.2.1. Now I have the problem that it doesn't find any kits. I assumed when you install an SDK it would be registered in a place where QtCreator could find it, but apparently just extending PATH doesn't do the trick.Do I have to add it manually? I tried that, too, but the SDK doesn't have a GCC. I tried using RCC instead, but QtCreator says that this one is not able to compile the project. And unfortunately there doesn't seem to be a tutorial on that here. so I'd like to know
- how to properly register the SDK so QtCreator sees it and
- if that's not possible, how to link a kit manually
Cheers
Alex -
Also the SDK we're currently using for compiling (a custom-made arm SDK) has some functionality that's required as well, so if I switch all paths in our compile-scripts to the Qt for Embedded Linux SDK I get the error
"configure: error: C compiler cannot create executables"So apparently I need some functionality from the current SDK, too. I guess that means I'd have to merge both SDKs, right? Is something like that even doable? I mean, obviously it's possible to customize an SDK, but the Qt for Embedded Linux one seems to be the only one capable of keyboard layout switching, so I'm expecting massive compatibility problems.
-
You are mixing several things.
To register a new version of Qt with Qt Creator you have to go the Build & Run panel of the Preferences, Qt Version and add it there. Qt doesn't provide gcc (or rather g++) you have to install these using your linux distribution package manager.
Did you already cross-compiled Qt for arm ?