Showing posts with label Qt. Show all posts
Showing posts with label Qt. Show all posts

Saturday, April 27, 2013

QPlatformInputContext and virtual keyboard mockup


Imagine that you're developer preferring Qt, and:
  • you convinced your manager to try out Qt/Qt Quick as UI framework for your custom device (cash machine, POS, ticket machine etc.) to port some old app. 
  • it lacks hardware and software keyboard (the original application's hardcoded its keyboard inside so you can't reuse it).
  • main Qt5 modules are working on the target device (QtCore, QtGui, QtQuick) 
  • you have to provide demo of Qt Quick features on such device (animations, transitions, particles).  
  • deadline is yesterday.
  • you know that if you provide some forms with text input fields and virtual keyboard along with animations and other fireworks then the status of the meeting will change from demo/POC to pre-alpha presentation :)
Animations, particles, transitions are very easy to implement (you could also take sources of Qt Cinematic Experience and change according to needs). The only question is - how fast one will be able to implement mockup of virtual keyboard and reuse it in Qt Quick text editors? Of course Qt handles some standard input systems like Maliit or IBus but they have some dependencies (ex. D-Bus, python). Assuming that our platform doesn't have Maliit or IBus services installed, the only way to achieve the goal is to write some virtual keyboard from scratch. Q Platform Abstraction is the best way to resolve our problem. It's not  officially documented yet but it's self-explanatory API simplifies adding some platform specific features to Qt. Following steps will show how to create custom virtual keyboard that will work with all standard Qt editors (Qt Quick and QtWidgets).

Monday, March 18, 2013

Simple QML vs EFL comparison


Recently I found this blog post about complete minesweeper clone - elemines - based on Enlightenment Foundation Libraries. As EFL are designed to efficiently work even on PDAs, I came up with an idea to implement similar clone in plain QML/Javascript (QmlMiner) and perform simple comparative analysis. I wondered how the QML version would compare with the EFL one.
Following areas were analyzed:
  1. Developer experience
  2. Source code size and used languages
  3. Memory consumption
  4. Startup time
The comparison was concluded with a limited performance check.
You can look at it from many angles. Just note that I was comparing virtual-machine-based  runtime (Qt4/QML - QtQuick 1.1, JavaScript) with EFL app that is coded in C and compiled into a native binary to see how much advantage the low-level C programming has over more modern technology such as QML.