Cross-platform software libraries and APIs
Qt Creator IDE and productivity tools
UI Design tool for UI composition
GUI test automation
Code coverage analysis
Test results management and analysis
Software static code analysis
Software architecture verification
The latest version of Qt.
Make the most of Qt tools, with options for commercial licensing, subscriptions, or open-source.
Explore Qt features, the Framework essentials, modules, tools & add-ons.
The project offers PySide6 - the official Python bindings that enhance Python applications.
Qt empowers productivity across the entire product development lifecycle, from UI design and software development to quality assurance and deployment. Find the solution that best suits your needs.
Insight into the evolution and importance of user-centric trends and strategies.
Learn how to shorten development times, improve user experience, and deploy anywhere.
Tips on efficient development, software architecture, and boosting team happiness.
Get the latest resources, check out upcoming events, and see who’s innovating with Qt.
Whether you're a beginner or a seasoned Qt pro, we have all the help and support you need to succeed.
June 29, 2010 by Thorbjorn Lindeijer | Comments
Recently I presented a small Qt 4.6 based demo on the LinuxTag in Berlin, as an example of something you could do with the Nokia Qt SDK. It combined existing projects like the Tiled map editor and the Box2D physics library with Qt Mobility's sensors API for reading out the accelerometer. It looks like this on the N900:
Andreas has demonstrated before that integrating Box2D and QGraphicsView is easy. In this demo I have used the generic object layer support in the Tiled map editor to conveniently define the starting points and properties of some boxes, including the definition of the colliding parts of the rather minimal tile based background.
The big red boxes around the sides are a quick hack to prevent any of the dynamic boxes from leaving the scene. Since indeed, turning your device will change the gravity applied to the boxes as appropriate. This was the first time I've used an accelerometer and I expected it to be somewhat more complicated, but combining the sensors API in Qt Mobility with Box2D was as easy as:
QAccelerometerReading *reading = mAccelerometer->reading();
b2Vec2 gravity(-reading->x(), -reading->y());
mWorld->SetGravity(gravity);
As documented, the accelerometer gives us the force applied to the device relative to freefall. When the device is in rest, this is the exact opposite of the applied gravitational force. Hence we have to reverse the x and y readings when turning them into the gravitational force applied to the Box2D world. One little caveat: as of Qt Mobility 1.0 the application will need to run as root on the N900 to be able to get any values out of the accelerometer. This is bug QTMOBILITY-326.
Here is the demo in action:
The complete sources of this demo are available on gitorious.org, on the 'qtarcade' branch. The repository includes the necessary classes from Tiled and Box2D so that it's easy to try it out.
With Qt Creator 2.0 and the Nokia Qt SDK 1.0 released last week, it could not be easier to start hacking and implement your own crazy ideas. Who will be the first to get his cool Qt app signed for free and distributed on the Ovi store?
Download the latest release here: www.qt.io/download.
Qt 6.8 release focuses on technology trends like spatial computing & XR, complex data visualization in 2D & 3D, and ARM-based development for desktop.
Check out all our open positions here and follow us on Instagram to see what it's like to be #QtPeople.
Sep 20, 2024
Qt Gradle Plugin 1.0 (QtGP) build tool has been released. You can include..
Sep 16, 2024
We are happy to announce the release of Qt Tools for Android Studio 3.0...
Aug 30, 2024
Qt/.NET is a proposed toolkit for interoperability between C++ and .NET,..
Qt Group includes The Qt Company Oy and its global subsidiaries and affiliates.