Tag: Qt
TwitCoop: A Desktop Cage for Twitter Mobile Web
The official Twitter for Mac app gives a great interface for Twitter: lightweight, compact, no bloat, and it looks great. Unfortunately, amongst the hundreds of Twitter clients already existing, I couldn’t find anything similar for Linux or Windows. Instead of creating yet another client (which Twitter doesn’t like anyway), I did a bit of Qt WebKit coding, and created a small desktop client around the (current) Twitter Mobile Web interface.
Improving QtTest usability with QtTestUtil
As much as I like CppUnit for writing C++ unit tests, I still prefer using Qt’s built-in QtTest module for Qt-based projects. This avoids a dependency on an external library, lowering the threshold for running and writing unit tests. Unfortunately, QtTest is very basic, and lacks some useful features such as automatic test registration and running multiple test suites in one test binary. In order to improve QtTest’s usability, I started creating some macros and classes that fill in some of the gaps, and bundled them into QtTestUtil.
Mixing Cocoa and Qt
Qt does a great job at abstracting out platform-specific features into platform-independent C++ APIs. However, sometimes you still need to write platform-specific code for features that are not in Qt (e.g. to access the platform’s address book), or to access platform-specific applications (e.g. iTunes) or libraries (e.g. Sparkle). On Mac OS X, almost all interfaces are offered through the Cocoa Objective-C interface, and the interfaces that are written in C++ have been deprecated and will disappear soon in favor of Cocoa. Although the language of Cocoa is different from Qt’s, Qt and GCC make it very easy to call these interfaces from within your application. In this post, I will show how this can be done by making an auto-updating application using Sparkle.