Sunday, May 2, 2010

Looking for Qt examples? Visit Forum Nokia

As a long time developer using Qt, I'm very used to read Qt documentation and visit Qt website quite often. I'm also a regular reader to Qt Labs, where I can keep myself informed about the latest news regarding what's the Trolls are cooking up, upcoming features and research they're doing. But recently, I discovered Forum Nokia and a bunch of Qt code examples.

Thursday, April 1, 2010

MathML editor using Qt support for MathML

I decided to give the MML widget a try to create an example for MathML rendering: display a mathematical formula from the description contained in an XML file. This is a component available from Qt solutions (see my previous post about them) to enhance the by itself long list of classes and modules already available in Qt. For more information about the MathML standard, you may read this MathML introduction

Thursday, February 18, 2010

Extending QTranslator

Although internationalization with Qt has very good tools to deal with translations inside an application, I was posed with the requirement to use existing files with proprietary format for the actual translated strings.

Wednesday, December 16, 2009

Qt Solutions, please help yourself

Are you aware that Nokia has launched Qt Solutions? Please refer to the Qt Solutions Catalog and you'll be surprised about the components and tools available there that can be used along Qt just to improve and enhance the cross-platform applications you develop.

My first contribution to Qt

And it finally happened! I've just sent my first code contribution to the Qt open repository. Now I'm waiting for them to approve (or eventually reject, you never know) my submission which is based on the code I presented in a previous blog.

Tuesday, November 24, 2009

Persistent logging (for debug purposes)

Many of us, Qt developers, resort to qDebug() (and the companion qWarning(), qCritical() and qFatal() functions) to write out debugging and tracing information along the flow of our application.

Most of the time, it's just a question of sending the desired message (a QtMsgType value) to the output stream provided by qDebug():
qDebug() << "Date: " << QDate::currentDate();
Moreover, the streaming operator << can be extended to provide support for custom types, for instance:
QDebug operator<<(QDebug dbg, const Circle &c)
{
    dbg.nospace() << "Radius: " << c.radius();
    return dbg.space();
}

Make it persistent
What if we need to get a copy of all the debug messages thrown by the application during a debugging session?

Thursday, October 8, 2009

Interesting testing

QTestLib is a framework provided by Nokia to create unit tests for applications developed using Qt.

It's a lightweight library, with several features like test initialization and cleanup, benchmarking and data driven testing. One thing it provides I found very useful it's the ability to simulate GUI events, both clicking a sequence of keys or generating mouse events (clicking, double clicking, moving) .