Quick User Interfaces with Qt
Looking at the future of Qt Quick, many things may happen. In MeeGo, the MeeGo touch initiative is implementing new widgets using Qt Quick. In KDE, Plasma is supporting Qt Quick. One effect of this is that you can write Plasmoids using QML. In the Qt tooling department, the trolls are working on a visual designer for Qt Quick. It already has a few interesting features—for instance, layers can be imported from GIMP and Photoshop directly into the designer.
Looking at Qt, I don't think we have seen the last widget-based application yet. Actually, when creating serious software for serious tasks, I see no reason not to use widgets. However, with the new focus on mobile, not only within the old Trolltech, but the entire Linux community, I think that Qt Quick will be a very frequently used tool.
Getting Started with Qt Quick
As Qt 4.7 recently was released, Qt Quick is becoming available through the repositories of most distributions. Some distributions choose to package Qt in several packages, so make sure you get the Qt development package, the Qt Creator package and all Qt modules, especially those referencing to Qt declarative. In the Linux world, I recommend you use the facilities provided by your distribution to install and maintain your software. However, for those of you needing a particular version of the Qt tools, or if you are using a distribution that doesn't include Qt, you can download the Qt SDK from Nokia's Web site.
The package that you want is the Qt SDK, available from qt.nokia.com/downloads. Simply download the file, chmod it to make it executable and run the installer. You can install it in your home directory if you do not have root access. The SDK includes tools, demos, sources and documentation, all in one convenient package.
Limitations of Widgets
There are a number of limitations imposed from building user interfaces with widgets that are addressed when switching to a graphics view-based approach. One obvious limitation is that widgets are rectangular and like to be arranged side by side, which makes it hard to arrange non-rectangular items in a good manner.
Another limitation is that widgets clip their children, which means children cannot extend outside their parent widget. Take a simple effect, such as having parts of a user interface explode. In that case, clipping is a limiting factor.
Another feature that widget-based systems usually do not support is sub-pixel resolution for item dimensions and placement. Also, transformations, such as scaling and rotation, are not supported by widgets. In a scene, all these features can be used to achieve the best possible visual experience.
Taking transformations over time, it becomes obvious that widgets are not meant to slide, bounce or generally move about. They are designed to be arranged in layouts based on grids, columns and rows, and they provide users with a standardized, structured user interface. This is very good when the user is using the computer as a computer. When the user is using a device, this type of computer interface is not the most appropriate solution.
Johan Thelin is a passionate Qt and open-source user. He spends his days at Pelagicore working with Linux and open source in the automotive industry. At night, he works as a consultant and freelance writer.
Johan Thelin is a consultant working with Qt, embedded and free software. On-line, he is known as e8johan.
|PostgreSQL, the NoSQL Database||Jan 29, 2015|
|HPC Cluster Grant Accepting Applications!||Jan 28, 2015|
|Sharing Admin Privileges for Many Hosts Securely||Jan 28, 2015|
|Red Hat Enterprise Linux 7.1 beta available on IBM Power Platform||Jan 23, 2015|
|Designing with Linux||Jan 22, 2015|
|Wondershaper—QOS in a Pinch||Jan 21, 2015|
- PostgreSQL, the NoSQL Database
- Sharing Admin Privileges for Many Hosts Securely
- HPC Cluster Grant Accepting Applications!
- Internet of Things Blows Away CES, and it May Be Hunting for YOU Next
- Designing with Linux
- Wondershaper—QOS in a Pinch
- Ideal Backups with zbackup
- Red Hat Enterprise Linux 7.1 beta available on IBM Power Platform
- Slow System? iotop Is Your Friend
- January 2015 Issue of Linux Journal: Security
Editorial Advisory Panel
Thank you to our 2014 Editorial Advisors!
- Jeff Parent
- Brad Baillio
- Nick Baronian
- Steve Case
- Chadalavada Kalyana
- Caleb Cullen
- Keir Davis
- Michael Eager
- Nick Faltys
- Dennis Frey
- Philip Jacob
- Jay Kruizenga
- Steve Marquez
- Dave McAllister
- Craig Oda
- Mike Roberts
- Chris Stark
- Patrick Swartz
- David Lynch
- Alicia Gibb
- Thomas Quinlan
- Carson McDonald
- Kristen Shoemaker
- Charnell Luchich
- James Walker
- Victor Gregorio
- Hari Boukis
- Brian Conner
- David Lane