<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-2149729862162628363</id><updated>2012-01-03T14:49:40.215Z</updated><category term='debug'/><category term='designer'/><category term='win32 xp'/><category term='.pro sessions'/><category term='dll msvc'/><category term='gdb debugging-helpers typedef'/><category term='books'/><category term='include .pro'/><category term='gcc'/><category term='.pro lib'/><category term='unit-testing'/><category term='qt'/><category term='gdb dell'/><category term='win32 icon'/><category term='qmake'/><category term='help'/><category term='gdb breakpoint'/><category term='debug feature-request'/><title type='text'>Qt Creator Blog</title><subtitle type='html'>An unofficial blog for all things Qt Creator.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://qtcreator.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2149729862162628363/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://qtcreator.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Rob Caldecott</name><uri>http://www.blogger.com/profile/16139053405031925765</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='18' src='http://bp3.blogger.com/_4pUyapZ-mEE/R18XPrI851I/AAAAAAAAAUs/ok7oOC8z2o4/S220/rec.png'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>43</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-2149729862162628363.post-245962035241257694</id><published>2011-02-13T18:19:00.003Z</published><updated>2011-02-13T18:29:28.623Z</updated><title type='text'>Long live Qt!</title><content type='html'>I use Qt for desktop development and am not terribly interested in mobile apps at the moment (and web-apps are a better idea in the vertical market where I work, which is a different toolset) so Nokia's decision to get into bed with Microsoft doesn't concern me in the short term.  I think the best thing that could happen is for someone else to make Nokia an offer for Qt ... Intel or Google perhaps, or for the ex-Trolltech guys to strike out on their own.  Either way I feel that Qt is the best choice for cross-platform desktop development and long may it continue.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://blog.qt.nokia.com/2011/02/12/nokia-new-strategic-direction-what-is-the-future-for-qt/"&gt;What is the future for Qt?&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I will try to update this blog more often, especially in light of the recent Nokia announcement.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;BTW, I spent 6 months working at Nokia in 2010 and they really had to do something about their glaring lack of a decent smartphone.  Whether the decision to adopt WP7 was the right one or not I guess only history will tell but I'm not optimistic and think that Microsoft swallowing Nokia whole is a distinct possibility.  Let's hope Qt survives and thrives.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2149729862162628363-245962035241257694?l=qtcreator.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtcreator.blogspot.com/feeds/245962035241257694/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qtcreator.blogspot.com/2011/02/long-live-qt.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2149729862162628363/posts/default/245962035241257694'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2149729862162628363/posts/default/245962035241257694'/><link rel='alternate' type='text/html' href='http://qtcreator.blogspot.com/2011/02/long-live-qt.html' title='Long live Qt!'/><author><name>Rob Caldecott</name><uri>http://www.blogger.com/profile/16139053405031925765</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='18' src='http://bp3.blogger.com/_4pUyapZ-mEE/R18XPrI851I/AAAAAAAAAUs/ok7oOC8z2o4/S220/rec.png'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2149729862162628363.post-4150488936881952532</id><published>2010-05-10T20:51:00.003+01:00</published><updated>2010-05-10T21:18:56.810+01:00</updated><title type='text'>Qt Creator 2.0 Beta First Impressions</title><content type='html'>Last week Nokia released a beta of Qt Creator 2.0 (and Qt 4.7 FWIW) and I have finally managed to spend some time playing with it today.  Here's a quick list of likes and dislikes in no particular order.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Likes&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;The &lt;b&gt;new Options dialog&lt;/b&gt; is much easier to use IMHO.  It doesn't add much to the product but there's nothing wrong with a bit of polish and attention to detail.&lt;/li&gt;&lt;li&gt;Support for &lt;b&gt;Mercurial&lt;/b&gt; (Hg).  I have been using this today without any problems.&lt;/li&gt;&lt;li&gt;Revamped &lt;b&gt;Projects view&lt;/b&gt;.  I'm not a massive fan of anything that leads to a dependency on a .pro.user file but the new Projects page is much easier to use than previous releases.&lt;/li&gt;&lt;li&gt;The new &lt;b&gt;Build/Target&lt;/b&gt; button is pretty smart and really useful when you have multiple projects loaded.  Ctrl+T pops it up for those of us who are keyboard-centric.&lt;/li&gt;&lt;li&gt;You can now right-click on a project file and open it using the '&lt;b&gt;System Editor&lt;/b&gt;' (i.e. the application registered for the selected file extension) which I will be using a lot.&lt;/li&gt;&lt;li&gt;You can finally set the &lt;b&gt;default projects directory&lt;/b&gt;.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;Dislikes&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;On Windows, &lt;b&gt;Ctrl+W&lt;/b&gt; no longer closes the current file - this has now been changed to the 'standard' Ctrl+F4 keystroke instead.  I found this annoying and can hopefully restore Ctrl+W using the keyboard mappings editor.&lt;/li&gt;&lt;li&gt;The &lt;b&gt;Output view&lt;/b&gt; has been removed.  I am in two minds as to whether this was a good idea.&lt;/li&gt;&lt;li&gt;You cannot &lt;b&gt;make a project active&lt;/b&gt; by right-clicking on it - you have to use the new Build/Run Target Selector.&lt;/li&gt;&lt;li&gt;I cannot get the &lt;b&gt;Mercurial commit keystroke&lt;/b&gt; to work (Alt+H, Alt+C).  Alt+H opens the Help menu.  I must be missing something here.&lt;/li&gt;&lt;li&gt;When you are editing a .ui file, the new Design view is enabled.  If you switch back to the Edit view, the &lt;b&gt;XML .ui file&lt;/b&gt; is displayed in read-only mode.  I'm not sure if this is desirable.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Shadow builds&lt;/b&gt; are enabled by default which confused me for a little while ("Where the hell's my bloody executable?").  I'm actually on the fence about shadow builds - I'm only doing desktop development so aren't sure if they are of much use to me.  Plus I can't find a really good overview of the advantages of using them.&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;Overall I do prefer it to 1.3 and as I've come to expect from Nokia, it's rock solid.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I'll post a more detailed review when the final version ships (which I'm betting won't be long.)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2149729862162628363-4150488936881952532?l=qtcreator.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtcreator.blogspot.com/feeds/4150488936881952532/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qtcreator.blogspot.com/2010/05/qt-creator-20-beta-first-impressions.html#comment-form' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2149729862162628363/posts/default/4150488936881952532'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2149729862162628363/posts/default/4150488936881952532'/><link rel='alternate' type='text/html' href='http://qtcreator.blogspot.com/2010/05/qt-creator-20-beta-first-impressions.html' title='Qt Creator 2.0 Beta First Impressions'/><author><name>Rob Caldecott</name><uri>http://www.blogger.com/profile/16139053405031925765</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='18' src='http://bp3.blogger.com/_4pUyapZ-mEE/R18XPrI851I/AAAAAAAAAUs/ok7oOC8z2o4/S220/rec.png'/></author><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2149729862162628363.post-8031640262415640763</id><published>2010-05-10T11:29:00.003+01:00</published><updated>2010-05-10T11:48:04.147+01:00</updated><title type='text'>Code to Generate a Version Number Header (2)</title><content type='html'>I have recently switched to using Mercurial (Hg) as my version control system of choice so have updated my little tool used to generate a version number header file that other projects can include.  I have included both the local and global Hg revision numbers plus I've added an inline function to return the version number as a string.  As before, the version number includes the major, minor and daily build numbers.  I display the global Hg revision number in my About dialogs in the same way as Qt Creator does (the global Hg revision number is a string).&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;A typical version header now looks like this:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;#ifndef VERSION_H&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;#define VERSION_H&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;namespace Version&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;const int MAJOR = 1;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;const int MINOR = 6;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;const int LOCAL_REVISION = 46;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;const int BUILD = 16130;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;inline const char* versionString()&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;return "1.6.46.16130";&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;inline const char* globalRevision()&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;return "81a3662fbc71";&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;#endif // VERSION_H&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The code that produces the header looks like this (apologies for the formatting - the online source code formatter isn't working today):&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;div&gt;#include &amp;lt;iostream&amp;gt;&lt;/div&gt;&lt;div&gt;#include &amp;lt;QProcess&amp;gt;&lt;/div&gt;&lt;div&gt;#include &amp;lt;QStringList&amp;gt;&lt;/div&gt;&lt;div&gt;#include &amp;lt;QFile&amp;gt;&lt;/div&gt;&lt;div&gt;#include &amp;lt;QTextStream&amp;gt;&lt;/div&gt;&lt;div&gt;#include &amp;lt;QDate&amp;gt;&lt;/div&gt;&lt;div&gt;#include &amp;lt;QTime&amp;gt;&lt;/div&gt;&lt;div&gt;#include &amp;lt;QFileInfo&amp;gt;&lt;/div&gt;&lt;div&gt;#include &amp;lt;QTemporaryFile&amp;gt;&lt;/div&gt;&lt;div&gt;#include &amp;lt;QtGlobal&amp;gt;&lt;/div&gt;&lt;div&gt;#include &amp;lt;cstdlib&amp;gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;namespace&lt;/div&gt;&lt;div&gt;{&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;int getBuildNumber()&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;{&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;const QDate today(QDate::currentDate());&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;return ((today.year() - 1994) * 1000) + today.dayOfYear();&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;}&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;int getLocalHgRevision()&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;{&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;int revision = 0;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;QProcess process;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;process.start("hg", QStringList() &amp;lt;&amp;lt; "id" &amp;lt;&amp;lt; "-n");&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;if (process.waitForStarted() &amp;amp;&amp;amp; process.waitForReadyRead())&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;{&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;revision = atoi(process.readAll().constData());&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;process.waitForFinished();&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;}&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;return revision;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;}&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;QString getGlobalHgRevision()&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;{&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;QString revision = "";&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;QProcess process;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;process.start("hg", QStringList() &amp;lt;&amp;lt; "id" &amp;lt;&amp;lt; "-i");&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;if (process.waitForStarted() &amp;amp;&amp;amp; process.waitForReadyRead())&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;{&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;revision = QString(process.readAll().constData()).trimmed();&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;revision.remove('+');&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;process.waitForFinished();&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;}&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;return revision;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;}&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;QByteArray readFile(const QString&amp;amp; fileName)&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;{&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;QFile file(fileName);&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;if (!file.open(QIODevice::ReadOnly))&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;{&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;return QByteArray();&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;}&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;return file.readAll();&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;}&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;int writeFile(const QString&amp;amp; fileName, const int major, const int minor, const int localRevision,&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;const int buildNumber, const QString&amp;amp; globalRevision)&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;{&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;// Create a temp file containing the version info and&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;// only replace the existing one if they are different&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;QTemporaryFile tempFile;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;if (tempFile.open())&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;{&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;QTextStream out(&amp;amp;tempFile);&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;out &amp;lt;&amp;lt; "#ifndef VERSION_H\r\n";&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;out &amp;lt;&amp;lt; "#define VERSION_H\r\n\r\n";&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;out &amp;lt;&amp;lt; "namespace Version\r\n";&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;out &amp;lt;&amp;lt; "{\r\n";&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;out &amp;lt;&amp;lt; "\tconst int MAJOR = " &amp;lt;&amp;lt; major &amp;lt;&amp;lt; ";\r\n";&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;out &amp;lt;&amp;lt; "\tconst int MINOR = " &amp;lt;&amp;lt; minor &amp;lt;&amp;lt; ";\r\n";&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;out &amp;lt;&amp;lt; "\tconst int LOCAL_REVISION = " &amp;lt;&amp;lt; localRevision &amp;lt;&amp;lt; ";\r\n";&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;out &amp;lt;&amp;lt; "\tconst int BUILD = " &amp;lt;&amp;lt; buildNumber &amp;lt;&amp;lt; ";\r\n\r\n";&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;out &amp;lt;&amp;lt; "\tinline const char* versionString()\r\n";&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;out &amp;lt;&amp;lt; "\t{\r\n";&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;out &amp;lt;&amp;lt; "\t\treturn \"" &amp;lt;&amp;lt; major &amp;lt;&amp;lt; '.' &amp;lt;&amp;lt; minor &amp;lt;&amp;lt; '.' &amp;lt;&amp;lt; localRevision &amp;lt;&amp;lt; '.' &amp;lt;&amp;lt; buildNumber &amp;lt;&amp;lt; "\";\r\n";&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;out &amp;lt;&amp;lt; "\t}\r\n\r\n";&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;out &amp;lt;&amp;lt; "\tinline const char* globalRevision()\r\n";&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;out &amp;lt;&amp;lt; "\t{\r\n";&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;out &amp;lt;&amp;lt; "\t\treturn \"" &amp;lt;&amp;lt; globalRevision &amp;lt;&amp;lt; "\";\r\n";&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;out &amp;lt;&amp;lt; "\t}\r\n";&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;out &amp;lt;&amp;lt; "}\r\n\r\n";&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;out &amp;lt;&amp;lt; "#endif // VERSION_H\r\n";&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;const QString tempFileName = tempFile.fileName();&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;tempFile.close();&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;if (!QFile::exists(fileName) || readFile(fileName) != readFile(tempFileName))&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;{&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;    &lt;/span&gt;QFile::remove(fileName);&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;    &lt;/span&gt;QFile::copy(tempFileName, fileName);&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;}&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;return 0;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;}&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;else&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;{&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;std::cout &amp;lt;&amp;lt; "Error creating temporary file!" &amp;lt;&amp;lt; std::endl;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;return 1;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;}&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;}&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;int main(int argc, char *argv[])&lt;/div&gt;&lt;div&gt;{&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;if (argc != 4)&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;{&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;std::cout &amp;lt;&amp;lt; "Usage: version major minor filename" &amp;lt;&amp;lt; std::endl;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;return 1;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;}&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;const int major = atoi(argv[1]);&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;const int minor = atoi(argv[2]);&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;const int localRevision = getLocalHgRevision();&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;const QString globalRevision = getGlobalHgRevision();&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;const int buildNumber = getBuildNumber();&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;std::cout &amp;lt;&amp;lt; major &amp;lt;&amp;lt; '.' &amp;lt;&amp;lt; minor &amp;lt;&amp;lt; '.' &amp;lt;&amp;lt; localRevision &amp;lt;&amp;lt; '.' &amp;lt;&amp;lt; buildNumber;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;std::cout &amp;lt;&amp;lt; ' ' &amp;lt;&amp;lt; qPrintable(globalRevision) &amp;lt;&amp;lt; std::endl;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;return writeFile(argv[3], major, minor, localRevision, buildNumber, globalRevision);&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2149729862162628363-8031640262415640763?l=qtcreator.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtcreator.blogspot.com/feeds/8031640262415640763/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qtcreator.blogspot.com/2010/05/code-to-generate-version-number-header.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2149729862162628363/posts/default/8031640262415640763'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2149729862162628363/posts/default/8031640262415640763'/><link rel='alternate' type='text/html' href='http://qtcreator.blogspot.com/2010/05/code-to-generate-version-number-header.html' title='Code to Generate a Version Number Header (2)'/><author><name>Rob Caldecott</name><uri>http://www.blogger.com/profile/16139053405031925765</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='18' src='http://bp3.blogger.com/_4pUyapZ-mEE/R18XPrI851I/AAAAAAAAAUs/ok7oOC8z2o4/S220/rec.png'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2149729862162628363.post-3343240434025397936</id><published>2010-05-09T20:13:00.003+01:00</published><updated>2010-05-09T20:37:10.830+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='qt'/><title type='text'>Hidden Features of Qt</title><content type='html'>OK, the title of this post is a bit of a misnomer as the Qt documentation is so good you'd be hard pushed to find something that is truly hidden ... but I came across a great list on &lt;a href="http://stackoverflow.com/questions/1826458/hidden-features-of-qt"&gt;stackoverflow&lt;/a&gt; and I thought I'd share the best bits here.&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;forever&lt;br /&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;This is a macro that expands to &lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;for (;;)&lt;/span&gt;.  Very useful.  You're already using &lt;/span&gt;foreach&lt;/b&gt; already right?&lt;/li&gt;&lt;li&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;b&gt;qChecksum&lt;/b&gt;&lt;br /&gt;This returns a CRC-16 checksum of a &lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;char*&lt;/span&gt; buffer.&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;b&gt;qCompress / qUncompress&lt;/b&gt;&lt;br /&gt;These functions perform zlib compression/uncompression of a &lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;QByteArray&lt;/span&gt;.  You can also specify the compression level.&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;qFuzzyCompare&lt;/b&gt;&lt;br /&gt;Use this to safely compare float/double values and avoid the &lt;a href="http://www.parashift.com/c++-faq-lite/newbie.html#faq-29.17"&gt;dreaded floating point comparison trap&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;&lt;b&gt;qVersion&lt;/b&gt;&lt;br /&gt;Get the runtime version of Qt being used.&lt;/li&gt;&lt;li&gt;&lt;b&gt;qPrintable&lt;/b&gt;&lt;br /&gt;Converts a &lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;QString&lt;/span&gt; to a &lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;const char*&lt;/span&gt; instead of writing &lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;QString.toLocal8Bit().constData()&lt;/span&gt;.  Very useful - I could of done with this the other day when outputting some debug strings using...&lt;/li&gt;&lt;li&gt;&lt;b&gt;qDebug&lt;/b&gt;&lt;br /&gt;Write to the debug window, in &lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;std::iostream&lt;/span&gt; style, e.g.:&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;qDebug() &lt;&lt; "String contents: " &lt;&lt; qPrintable(myString);&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;QObject::deleteLater()&lt;/b&gt;&lt;br /&gt;This is used to force an object to delete itself (&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;delete this&lt;/span&gt;) when a signal occurs.  I have used this to delete a &lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;QTcpSocket&lt;/span&gt; object automatically when the socket is disconnected.&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;There are lots more if you follow the link.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2149729862162628363-3343240434025397936?l=qtcreator.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtcreator.blogspot.com/feeds/3343240434025397936/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qtcreator.blogspot.com/2010/05/hidden-features-of-qt.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2149729862162628363/posts/default/3343240434025397936'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2149729862162628363/posts/default/3343240434025397936'/><link rel='alternate' type='text/html' href='http://qtcreator.blogspot.com/2010/05/hidden-features-of-qt.html' title='Hidden Features of Qt'/><author><name>Rob Caldecott</name><uri>http://www.blogger.com/profile/16139053405031925765</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='18' src='http://bp3.blogger.com/_4pUyapZ-mEE/R18XPrI851I/AAAAAAAAAUs/ok7oOC8z2o4/S220/rec.png'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2149729862162628363.post-8550686343474600838</id><published>2010-04-28T20:57:00.003+01:00</published><updated>2010-04-28T21:03:17.384+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='unit-testing'/><title type='text'>Sample Multiple Unit Test Project</title><content type='html'>Long time no post...&lt;br /&gt;&lt;br /&gt;Anyway, someone asked me if I could upload a working test project that shows my AutoTest header in use, so &lt;a href="http://docs.google.com/leaf?id=0B_qEKHTZ4FrOMzNkYjk1ZWYtMmU3ZC00MmZlLWIxODMtOTUyMDRlYTAwNjFj&amp;amp;hl=en"&gt;click here to download test.zip&lt;/a&gt; which includes two sample test classes and a main.cpp that shows two ways to start the tests running.&lt;br /&gt;&lt;br /&gt;Open the test.pro file using Qt Creator, build it and let it rip and you should see output that looks something like this:&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;********* Start testing of Test2 *********&lt;br /&gt;Config: Using QTest library 4.6.2, Qt 4.6.2&lt;br /&gt;PASS   : Test2::initTestCase()&lt;br /&gt;PASS   : Test2::test1()&lt;br /&gt;FAIL!  : Test2::test2() Compared strings are not the same&lt;br /&gt;  Actual ("Hello"): Hello&lt;br /&gt;  Expected ("World!"): World!&lt;br /&gt;test2.cpp(14) : failure location&lt;br /&gt;PASS   : Test2::cleanupTestCase()&lt;br /&gt;Totals: 3 passed, 1 failed, 0 skipped&lt;br /&gt;********* Finished testing of Test2 *********&lt;br /&gt;********* Start testing of Test1 *********&lt;br /&gt;Config: Using QTest library 4.6.2, Qt 4.6.2&lt;br /&gt;PASS   : Test1::initTestCase()&lt;br /&gt;PASS   : Test1::test1()&lt;br /&gt;FAIL!  : Test1::test2() '1 == 0' returned FALSE. ()&lt;br /&gt;test1.cpp(14) : failure location&lt;br /&gt;PASS   : Test1::cleanupTestCase()&lt;br /&gt;Totals: 3 passed, 1 failed, 0 skipped&lt;br /&gt;********* Finished testing of Test1 *********&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I hope you find this useful - it has certainly made my life easier when using QTestLib.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2149729862162628363-8550686343474600838?l=qtcreator.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtcreator.blogspot.com/feeds/8550686343474600838/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qtcreator.blogspot.com/2010/04/sample-multiple-unit-test-project.html#comment-form' title='11 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2149729862162628363/posts/default/8550686343474600838'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2149729862162628363/posts/default/8550686343474600838'/><link rel='alternate' type='text/html' href='http://qtcreator.blogspot.com/2010/04/sample-multiple-unit-test-project.html' title='Sample Multiple Unit Test Project'/><author><name>Rob Caldecott</name><uri>http://www.blogger.com/profile/16139053405031925765</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='18' src='http://bp3.blogger.com/_4pUyapZ-mEE/R18XPrI851I/AAAAAAAAAUs/ok7oOC8z2o4/S220/rec.png'/></author><thr:total>11</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2149729862162628363.post-8533793332353317509</id><published>2010-01-14T08:20:00.002Z</published><updated>2010-01-14T08:39:33.692Z</updated><title type='text'>Code to Generate a Version Number Header</title><content type='html'>I've had a couple of requests to post the code I use to generate a version number header, so here it is.  Create a Qt console-based application using the code below and pass it the major and minor version numbers and the name of the header file to create on the command-line, e.g.:&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;version.exe 1 2 ver.h&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The code will create a header called &lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;ver.h&lt;/span&gt; using a major version number of &lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;1&lt;/span&gt; and a minor version number of &lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;2&lt;/span&gt;.  I include the Subversion revision number and a special build number that represents today's date, so the final version number might be something like:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;1.2.2345.16001&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Here is the &lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;version.cpp&lt;/span&gt; file:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;pre style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;padding:0px;color:#000000;text-align:left;line-height:20px;"&gt;&lt;code style="color:#000000;word-wrap:normal;"&gt;#include &amp;lt;iostream&amp;gt; &lt;br /&gt;#include &amp;lt;QProcess&amp;gt; &lt;br /&gt;#include &amp;lt;QStringList&amp;gt; &lt;br /&gt;#include &amp;lt;QFile&amp;gt; &lt;br /&gt;#include &amp;lt;QTextStream&amp;gt; &lt;br /&gt;#include &amp;lt;QDate&amp;gt; &lt;br /&gt;#include &amp;lt;QTime&amp;gt; &lt;br /&gt;#include &amp;lt;QFileInfo&amp;gt; &lt;br /&gt;#include &amp;lt;QTemporaryFile&amp;gt; &lt;br /&gt;#include &amp;lt;cstdlib&amp;gt; &lt;br /&gt; &lt;br /&gt;using namespace std; &lt;br /&gt; &lt;br /&gt;static int getBuildNumber() &lt;br /&gt;{ &lt;br /&gt;  const QDate today(QDate::currentDate()); &lt;br /&gt;  return ((today.year() - 1994) * 1000) + today.dayOfYear(); &lt;br /&gt;} &lt;br /&gt; &lt;br /&gt;static int getSubversionRevision() &lt;br /&gt;{ &lt;br /&gt;  int revision = 0; &lt;br /&gt;  QProcess process; &lt;br /&gt;  process.start("svnversion", QStringList() &amp;lt;&amp;lt; "." &amp;lt;&amp;lt; "--no-newline"); &lt;br /&gt;  if (process.waitForStarted() &amp;amp;&amp;amp; process.waitForReadyRead()) &lt;br /&gt;  { &lt;br /&gt;    const QString str(process.readAll().constData()); &lt;br /&gt;    const int pos = str.indexOf(':'); &lt;br /&gt;    if (pos != -1) &lt;br /&gt;    { &lt;br /&gt;      revision = atoi(str.mid(pos + 1).toAscii().constData()); &lt;br /&gt;    } &lt;br /&gt;    else &lt;br /&gt;    { &lt;br /&gt;      revision = atoi(str.toAscii().constData()); &lt;br /&gt;    } &lt;br /&gt;    process.waitForFinished(); &lt;br /&gt;  } &lt;br /&gt;  return revision; &lt;br /&gt;} &lt;br /&gt; &lt;br /&gt;static QByteArray readFile(const QString&amp;amp; fileName) &lt;br /&gt;{ &lt;br /&gt;  QFile file(fileName); &lt;br /&gt;  if (!file.open(QIODevice::ReadOnly)) &lt;br /&gt;  { &lt;br /&gt;    return QByteArray(); &lt;br /&gt;  } &lt;br /&gt;  return file.readAll(); &lt;br /&gt;} &lt;br /&gt; &lt;br /&gt;static int writeFile(const QString&amp;amp; fileName, const int major, const int minor, const int revision, const int build) &lt;br /&gt;{ &lt;br /&gt;  // Create a temp file containing the version info and &lt;br /&gt;  // only replace the existing one if they are different &lt;br /&gt;  QTemporaryFile tempFile; &lt;br /&gt;  if (tempFile.open()) &lt;br /&gt;  { &lt;br /&gt;    QTextStream out(&amp;amp;tempFile); &lt;br /&gt;    out &amp;lt;&amp;lt; "#ifndef VERSION_H\r\n"; &lt;br /&gt;    out &amp;lt;&amp;lt; "#define VERSION_H\r\n\r\n"; &lt;br /&gt;    out &amp;lt;&amp;lt; "namespace Version\r\n"; &lt;br /&gt;    out &amp;lt;&amp;lt; "{\r\n"; &lt;br /&gt;    out &amp;lt;&amp;lt; "\tstatic const int MAJOR = " &amp;lt;&amp;lt; major &amp;lt;&amp;lt; ";\r\n"; &lt;br /&gt;    out &amp;lt;&amp;lt; "\tstatic const int MINOR = " &amp;lt;&amp;lt; minor &amp;lt;&amp;lt; ";\r\n"; &lt;br /&gt;    out &amp;lt;&amp;lt; "\tstatic const int REVISION = " &amp;lt;&amp;lt; revision &amp;lt;&amp;lt; ";\r\n"; &lt;br /&gt;    out &amp;lt;&amp;lt; "\tstatic const int BUILD = " &amp;lt;&amp;lt; build &amp;lt;&amp;lt; ";\r\n"; &lt;br /&gt;    out &amp;lt;&amp;lt; "}\r\n\r\n"; &lt;br /&gt;    out &amp;lt;&amp;lt; "#endif // VERSION_H\r\n"; &lt;br /&gt; &lt;br /&gt;    const QString tempFileName = tempFile.fileName(); &lt;br /&gt;    tempFile.close(); &lt;br /&gt; &lt;br /&gt;    if (!QFile::exists(fileName) || readFile(fileName) != readFile(tempFileName)) &lt;br /&gt;    { &lt;br /&gt;      QFile::remove(fileName); &lt;br /&gt;      QFile::copy(tempFileName, fileName); &lt;br /&gt;    } &lt;br /&gt; &lt;br /&gt;    return 0; &lt;br /&gt;  } &lt;br /&gt;  else &lt;br /&gt;  { &lt;br /&gt;    cout &amp;lt;&amp;lt; "Error creating temporary file!" &amp;lt;&amp;lt; endl; &lt;br /&gt;    return 1; &lt;br /&gt;  } &lt;br /&gt;} &lt;br /&gt; &lt;br /&gt;int main(int argc, char *argv[]) &lt;br /&gt;{ &lt;br /&gt;  if (argc != 4) &lt;br /&gt;  { &lt;br /&gt;    cout &amp;lt;&amp;lt; "Usage: version major minor filename" &amp;lt;&amp;lt; endl; &lt;br /&gt;    return 1; &lt;br /&gt;  } &lt;br /&gt; &lt;br /&gt;  const int major = atoi(argv[1]); &lt;br /&gt;  const int minor = atoi(argv[2]); &lt;br /&gt;  const int revision = getSubversionRevision(); &lt;br /&gt;  const int build = getBuildNumber(); &lt;br /&gt; &lt;br /&gt;  cout &amp;lt;&amp;lt; major &amp;lt;&amp;lt; '.' &amp;lt;&amp;lt; minor &amp;lt;&amp;lt; '.' &amp;lt;&amp;lt; revision &amp;lt;&amp;lt; '.' &amp;lt;&amp;lt; build &amp;lt;&amp;lt; endl;   &lt;br /&gt; &lt;br /&gt;  return writeFile(argv[3], major, minor, revision, build); &lt;br /&gt;} &lt;br /&gt; &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2149729862162628363-8533793332353317509?l=qtcreator.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtcreator.blogspot.com/feeds/8533793332353317509/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qtcreator.blogspot.com/2010/01/code-to-generate-version-number-header.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2149729862162628363/posts/default/8533793332353317509'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2149729862162628363/posts/default/8533793332353317509'/><link rel='alternate' type='text/html' href='http://qtcreator.blogspot.com/2010/01/code-to-generate-version-number-header.html' title='Code to Generate a Version Number Header'/><author><name>Rob Caldecott</name><uri>http://www.blogger.com/profile/16139053405031925765</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='18' src='http://bp3.blogger.com/_4pUyapZ-mEE/R18XPrI851I/AAAAAAAAAUs/ok7oOC8z2o4/S220/rec.png'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2149729862162628363.post-7124771513447802034</id><published>2009-12-08T20:20:00.003Z</published><updated>2009-12-08T20:24:37.101Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='debug'/><title type='text'>Registering Qt Creator as a Post-Mortem Debugger on Windows</title><content type='html'>When you install Qt Creator on Windows you are offered the chance to register it as a post-mortem debugger.  This means, if your app should crash, you can launch Qt Creator to debug it.  Very handy.  However, if you forget to select this option when installing you can register it after the event from the command-line:&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&amp;lt;CreatorDir&amp;gt;\bin\qtcdebugger -register&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Note that you need to be an Admin user for this to work.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Thanks to Robert Löhning at Nokia for the top tip.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2149729862162628363-7124771513447802034?l=qtcreator.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtcreator.blogspot.com/feeds/7124771513447802034/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qtcreator.blogspot.com/2009/12/registering-qt-creator-as-post-mortem.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2149729862162628363/posts/default/7124771513447802034'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2149729862162628363/posts/default/7124771513447802034'/><link rel='alternate' type='text/html' href='http://qtcreator.blogspot.com/2009/12/registering-qt-creator-as-post-mortem.html' title='Registering Qt Creator as a Post-Mortem Debugger on Windows'/><author><name>Rob Caldecott</name><uri>http://www.blogger.com/profile/16139053405031925765</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='18' src='http://bp3.blogger.com/_4pUyapZ-mEE/R18XPrI851I/AAAAAAAAAUs/ok7oOC8z2o4/S220/rec.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2149729862162628363.post-8271764351478273020</id><published>2009-12-08T20:14:00.003Z</published><updated>2009-12-08T20:20:05.467Z</updated><title type='text'>Qt Creator 1.3/Qt 4.6.0 Released</title><content type='html'>Yes, this post is a little late for the party, but you can get the new Qt SDK from here:&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://qt.nokia.com/downloads"&gt;http://qt.nokia.com/downloads&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This version now ships with the MinGW 4.4 toolset which includes a faster compiler and generates better code.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Oh, and Qt have released a version of the 4.6.0 framework that is built using MS Visual Studio 2008.  This means, if you have the relevant MS development tools installed, you can compile your apps using the MS compiler (which might generate even better, smaller code than MinGW but let's not get into that argument now...)  This is useful as, previous to this release, you'd have to build an MS version of Qt yourself which was a PITA (it takes hours and gobbles disk space.)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;All hail the Trolls!&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2149729862162628363-8271764351478273020?l=qtcreator.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtcreator.blogspot.com/feeds/8271764351478273020/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qtcreator.blogspot.com/2009/12/qt-creator-13qt-460-released.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2149729862162628363/posts/default/8271764351478273020'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2149729862162628363/posts/default/8271764351478273020'/><link rel='alternate' type='text/html' href='http://qtcreator.blogspot.com/2009/12/qt-creator-13qt-460-released.html' title='Qt Creator 1.3/Qt 4.6.0 Released'/><author><name>Rob Caldecott</name><uri>http://www.blogger.com/profile/16139053405031925765</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='18' src='http://bp3.blogger.com/_4pUyapZ-mEE/R18XPrI851I/AAAAAAAAAUs/ok7oOC8z2o4/S220/rec.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2149729862162628363.post-4900527370371516771</id><published>2009-11-02T20:20:00.002Z</published><updated>2009-11-02T20:23:44.756Z</updated><title type='text'>Qt Creator Keyboard Reference Card</title><content type='html'>&lt;span&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span&gt;This is very, very useful.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;&lt;a href="http://kdab.net/qtcreator"&gt;http://kdab.net/qtcreator&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;Thanks to Nicolas Arnaud-Cormos who posted this on the Qt Creator mailing list.&lt;/span&gt;&lt;/span&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; color: rgb(0, 104, 28); font-weight: bold; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; "&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2149729862162628363-4900527370371516771?l=qtcreator.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtcreator.blogspot.com/feeds/4900527370371516771/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qtcreator.blogspot.com/2009/11/qt-creator-keyboard-reference-card.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2149729862162628363/posts/default/4900527370371516771'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2149729862162628363/posts/default/4900527370371516771'/><link rel='alternate' type='text/html' href='http://qtcreator.blogspot.com/2009/11/qt-creator-keyboard-reference-card.html' title='Qt Creator Keyboard Reference Card'/><author><name>Rob Caldecott</name><uri>http://www.blogger.com/profile/16139053405031925765</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='18' src='http://bp3.blogger.com/_4pUyapZ-mEE/R18XPrI851I/AAAAAAAAAUs/ok7oOC8z2o4/S220/rec.png'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2149729862162628363.post-5003909900045031775</id><published>2009-10-27T08:59:00.001Z</published><updated>2009-10-27T09:00:42.288Z</updated><title type='text'>Breakpoint Issue Fixed!</title><content type='html'>The breakpoint bug has been fixed in the October 27th nightly Windows build.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;ftp://ftp.qtsoftware.com/qtcreator/snapshots/2009-10-27/qt-creator-win-opensource-1.2.93-200910270102-setup.exe&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2149729862162628363-5003909900045031775?l=qtcreator.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtcreator.blogspot.com/feeds/5003909900045031775/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qtcreator.blogspot.com/2009/10/breakpoint-issue-fixed.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2149729862162628363/posts/default/5003909900045031775'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2149729862162628363/posts/default/5003909900045031775'/><link rel='alternate' type='text/html' href='http://qtcreator.blogspot.com/2009/10/breakpoint-issue-fixed.html' title='Breakpoint Issue Fixed!'/><author><name>Rob Caldecott</name><uri>http://www.blogger.com/profile/16139053405031925765</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='18' src='http://bp3.blogger.com/_4pUyapZ-mEE/R18XPrI851I/AAAAAAAAAUs/ok7oOC8z2o4/S220/rec.png'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2149729862162628363.post-2350141165095295958</id><published>2009-10-25T18:48:00.001Z</published><updated>2009-10-25T18:50:03.044Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='gdb breakpoint'/><title type='text'>Breakpoint Update</title><content type='html'>Further to my breakpoint issues, the latest snapshot is a little better - breakpoints don't work the second time you run your application, but they do the third time ... but not the fourth ... fifth is a charm though!  You get the idea.  :)  So, the Trolls are getting there.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2149729862162628363-2350141165095295958?l=qtcreator.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtcreator.blogspot.com/feeds/2350141165095295958/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qtcreator.blogspot.com/2009/10/breakpoint-update.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2149729862162628363/posts/default/2350141165095295958'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2149729862162628363/posts/default/2350141165095295958'/><link rel='alternate' type='text/html' href='http://qtcreator.blogspot.com/2009/10/breakpoint-update.html' title='Breakpoint Update'/><author><name>Rob Caldecott</name><uri>http://www.blogger.com/profile/16139053405031925765</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='18' src='http://bp3.blogger.com/_4pUyapZ-mEE/R18XPrI851I/AAAAAAAAAUs/ok7oOC8z2o4/S220/rec.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2149729862162628363.post-7312253181746316331</id><published>2009-10-25T18:40:00.005Z</published><updated>2009-10-25T18:47:14.656Z</updated><title type='text'>Unused Variables</title><content type='html'>&lt;div style="text-align: left;"&gt;Qt Creator will display unused variables in grey, which I absolutely love.  For example:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;img src="http://3.bp.blogspot.com/_4pUyapZ-mEE/SuSc5rcGjeI/AAAAAAAACJg/CTQNbek9py0/s400/unusedvar.png" style="cursor:pointer; cursor:hand;width: 287px; height: 106px;" border="0" alt="" id="BLOGGER_PHOTO_ID_5396610768223768034" /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;Once the variable is referenced in the method, the colour will change:&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;img src="http://2.bp.blogspot.com/_4pUyapZ-mEE/SuSc-vgtygI/AAAAAAAACJo/bHJkgD-oDR4/s400/usedvar.png" style="cursor:pointer; cursor:hand;width: 228px; height: 87px;" border="0" alt="" id="BLOGGER_PHOTO_ID_5396610855216204290" /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;It's little touches like this that make this product a joy to use.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2149729862162628363-7312253181746316331?l=qtcreator.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtcreator.blogspot.com/feeds/7312253181746316331/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qtcreator.blogspot.com/2009/10/unused-variables.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2149729862162628363/posts/default/7312253181746316331'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2149729862162628363/posts/default/7312253181746316331'/><link rel='alternate' type='text/html' href='http://qtcreator.blogspot.com/2009/10/unused-variables.html' title='Unused Variables'/><author><name>Rob Caldecott</name><uri>http://www.blogger.com/profile/16139053405031925765</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='18' src='http://bp3.blogger.com/_4pUyapZ-mEE/R18XPrI851I/AAAAAAAAAUs/ok7oOC8z2o4/S220/rec.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_4pUyapZ-mEE/SuSc5rcGjeI/AAAAAAAACJg/CTQNbek9py0/s72-c/unusedvar.png' height='72' width='72'/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2149729862162628363.post-4301644322405107000</id><published>2009-10-19T12:49:00.005+01:00</published><updated>2009-10-19T13:05:47.542+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='gdb breakpoint'/><title type='text'>Breakpoint Woes</title><content type='html'>I am having some serious breakpoint woes with Qt Creator 1.2.92 at the moment.  Breakpoints work fine the first time I set them, but once the application has been terminated, attempting to add/remove breakpoints will fail and they are never triggered.  This is driving me nuts and only a restart of Qt Creator seems to fix it.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Reproducing this problem is easy.&lt;/div&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;Fire up Qt Creator and create a new Qt4 Console Application project.&lt;/li&gt;&lt;li&gt;In main() set a breakpoint on the first line of code.&lt;/li&gt;&lt;li&gt;Hit F5 to debug.  The breakpoint is triggered.&lt;/li&gt;&lt;li&gt;Quit the application, then set a new breakpoint, or remove the existing one and set it again.&lt;/li&gt;&lt;li&gt;Hit F5 to debug.  The breakpoint won't be triggered.&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;It looks like the second time gdb is started you can only set breakpoints once the application is being debugged.  This is all well and good for a GUI app where you may have the opportunity to toggle the breakpoint as your app is running, but for applications such as unit test projects, you don't have time to do this before the application quits!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I find it hard to believe that something so fundamental is broken so if anyone has any hints, I'll be grateful.  FWIW I am using the version of gdb that ships with Qt Creator 1.2.92.  I have tried pointing this to the 2009.03 version instead, but it makes no difference at all.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Now, what I think is happening is this... when Qt Creator starts a debug session it should apply any breakpoints you've set by registering them with gdb.  This explains why, until you debug your app, the breakpoint symbol in your code has a little wait cursor next to it:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;img src="http://4.bp.blogspot.com/_4pUyapZ-mEE/StxVosBfUkI/AAAAAAAACIQ/B5spiKVsaMA/s320/breakpoint1.png" style="cursor:pointer; cursor:hand;width: 320px; height: 152px;" border="0" alt="" id="BLOGGER_PHOTO_ID_5394280611183546946" /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;When you debug your app the first time this icon changes as Qt Creator successfully applies the breakpoint:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;img src="http://1.bp.blogspot.com/_4pUyapZ-mEE/StxVyNQKK1I/AAAAAAAACIY/8Il4xa2-R60/s320/breakpoint.png" style="cursor:pointer; cursor:hand;width: 320px; height: 154px;" border="0" alt="" id="BLOGGER_PHOTO_ID_5394280774722267986" /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Any new breakpoints you add stay displayed with the wait cursor so it looks like Qt Creator isn't applying them.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2149729862162628363-4301644322405107000?l=qtcreator.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtcreator.blogspot.com/feeds/4301644322405107000/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qtcreator.blogspot.com/2009/10/breakpoint-woes.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2149729862162628363/posts/default/4301644322405107000'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2149729862162628363/posts/default/4301644322405107000'/><link rel='alternate' type='text/html' href='http://qtcreator.blogspot.com/2009/10/breakpoint-woes.html' title='Breakpoint Woes'/><author><name>Rob Caldecott</name><uri>http://www.blogger.com/profile/16139053405031925765</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='18' src='http://bp3.blogger.com/_4pUyapZ-mEE/R18XPrI851I/AAAAAAAAAUs/ok7oOC8z2o4/S220/rec.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_4pUyapZ-mEE/StxVosBfUkI/AAAAAAAACIQ/B5spiKVsaMA/s72-c/breakpoint1.png' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2149729862162628363.post-2990253840673563892</id><published>2009-10-19T07:44:00.003+01:00</published><updated>2009-10-19T07:46:06.753+01:00</updated><title type='text'>Stepping Through Build Errors/Search Results</title><content type='html'>Built your project and now you need to step through the build errors?  Or done a 'Find in Files' and you don't want to use the mouse to cycle through the results?  On Windows, hit &lt;b&gt;F6&lt;/b&gt; to display the next error/result or &lt;b&gt;Shift+F6&lt;/b&gt; to display the previous.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2149729862162628363-2990253840673563892?l=qtcreator.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtcreator.blogspot.com/feeds/2990253840673563892/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qtcreator.blogspot.com/2009/10/stepping-through-build-errorssearch.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2149729862162628363/posts/default/2990253840673563892'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2149729862162628363/posts/default/2990253840673563892'/><link rel='alternate' type='text/html' href='http://qtcreator.blogspot.com/2009/10/stepping-through-build-errorssearch.html' title='Stepping Through Build Errors/Search Results'/><author><name>Rob Caldecott</name><uri>http://www.blogger.com/profile/16139053405031925765</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='18' src='http://bp3.blogger.com/_4pUyapZ-mEE/R18XPrI851I/AAAAAAAAAUs/ok7oOC8z2o4/S220/rec.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2149729862162628363.post-811854384285841224</id><published>2009-10-16T21:15:00.003+01:00</published><updated>2009-10-16T21:19:25.494+01:00</updated><title type='text'>Blogger Source Code Formatting</title><content type='html'>OK, this is nothing to do with Qt Creator but I wanted to share this site that formats source code ready for using in Blogger posts:&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://codeformatter.blogspot.com"&gt;Source Code Formatter&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The results are pretty sweet:&lt;/div&gt;&lt;br /&gt;&lt;pre  style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;padding:0px;color:#000000;text-align:left;line-height:20px;"&gt;&lt;code style="color:#000000;word-wrap:normal;"&gt; #include &amp;lt;QtGui/QApplication&amp;gt;  &lt;br /&gt; #include "mainwindow.h"  &lt;br /&gt;   &lt;br /&gt; int main(int argc, char *argv[])  &lt;br /&gt; {  &lt;br /&gt;   QApplication a(argc, argv);  &lt;br /&gt;   MainWindow w;  &lt;br /&gt;   w.show();  &lt;br /&gt;   return a.exec();  &lt;br /&gt; }  &lt;br /&gt;   &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2149729862162628363-811854384285841224?l=qtcreator.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtcreator.blogspot.com/feeds/811854384285841224/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qtcreator.blogspot.com/2009/10/blogger-source-code-formatting.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2149729862162628363/posts/default/811854384285841224'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2149729862162628363/posts/default/811854384285841224'/><link rel='alternate' type='text/html' href='http://qtcreator.blogspot.com/2009/10/blogger-source-code-formatting.html' title='Blogger Source Code Formatting'/><author><name>Rob Caldecott</name><uri>http://www.blogger.com/profile/16139053405031925765</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='18' src='http://bp3.blogger.com/_4pUyapZ-mEE/R18XPrI851I/AAAAAAAAAUs/ok7oOC8z2o4/S220/rec.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2149729862162628363.post-3008975787200400566</id><published>2009-10-16T13:02:00.004+01:00</published><updated>2009-10-16T13:17:54.405+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='win32 xp'/><title type='text'>XP-style Common Dialogs</title><content type='html'>If you are using Qt to create Windows apps for XP then you might of noticed that the standard file dialogs (e.g. &lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;QFileDialog::getOpenFileName&lt;/span&gt;) are still using 'classic mode':&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;img src="http://3.bp.blogspot.com/_4pUyapZ-mEE/Sthh7NiwA5I/AAAAAAAACBM/vzbrwcDgdeo/s320/classic_file_open.png" style="cursor:pointer; cursor:hand;width: 320px; height: 220px;" border="0" alt="" id="BLOGGER_PHOTO_ID_5393168223651758994" /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If you want XP mode versions then you'll have to add a resource file that contains a reference to a magic manifest file which specifies that your app using v6 of the MS common controls library.  This is a similar process to adding an application icon as described in my previous post.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;First create a file with a .manifest extension (e.g. &lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;MyApp.manifest&lt;/span&gt;) containing the following XML:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&amp;lt;?xml version='1.0' encoding='UTF-8' standalone='yes'?&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&amp;lt;assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;  &amp;lt;dependency&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;    &amp;lt;dependentAssembly&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;      &amp;lt;assemblyIdentity type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*' /&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;    &amp;lt;/dependentAssembly&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;  &amp;lt;/dependency&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&amp;lt;/assembly&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Then create (or edit) your applications resource file (e.g. &lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;MyApp.rc&lt;/span&gt;) and add the following line:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;1 24 DISCARDABLE  "MyApp.manifest"&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If you haven't done already, add a win32 specific entry to your .pro file that points to your .rc file:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;win32:RC_FILE = MyApp.rc&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Build your project and you'll now have shiny XP common file dialogs:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;img src="http://1.bp.blogspot.com/_4pUyapZ-mEE/SthkGo8o3_I/AAAAAAAACBU/2JVlY0c0BvA/s320/xp_file_open.png" style="cursor:pointer; cursor:hand;width: 320px; height: 220px;" border="0" alt="" id="BLOGGER_PHOTO_ID_5393170619009916914" /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2149729862162628363-3008975787200400566?l=qtcreator.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtcreator.blogspot.com/feeds/3008975787200400566/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qtcreator.blogspot.com/2009/10/xp-style-common-dialogs.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2149729862162628363/posts/default/3008975787200400566'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2149729862162628363/posts/default/3008975787200400566'/><link rel='alternate' type='text/html' href='http://qtcreator.blogspot.com/2009/10/xp-style-common-dialogs.html' title='XP-style Common Dialogs'/><author><name>Rob Caldecott</name><uri>http://www.blogger.com/profile/16139053405031925765</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='18' src='http://bp3.blogger.com/_4pUyapZ-mEE/R18XPrI851I/AAAAAAAAAUs/ok7oOC8z2o4/S220/rec.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_4pUyapZ-mEE/Sthh7NiwA5I/AAAAAAAACBM/vzbrwcDgdeo/s72-c/classic_file_open.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2149729862162628363.post-5404125401511031568</id><published>2009-10-16T12:55:00.002+01:00</published><updated>2009-10-16T13:02:41.096+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='win32 icon'/><title type='text'>Application Icon on Windows</title><content type='html'>So you've written a cool Windows app using Qt - but hey, it doesn't have an icon!  Well, adding one is quite easy.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Simply create a special resource file that contains a reference to the .ico file that you want to use and then add a &lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;RC_FILE&lt;/span&gt; entry to your .pro file.  The resource file usually has a .rc extension, and will look something like this (e.g. &lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;MyApp.rc&lt;/span&gt;):&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;IDI_ICON1 ICON DISCARDABLE "path/to/an/icon.ico"&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The .pro entry that points to this file should be win32 specific:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;win32:RC_FILE = MyApp.rc&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Rebuild and hey presto! a nice Windows icon for your app.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;You can also give your Linux/Mac applications an icon.  More info on this can be found here:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://doc.trolltech.com/4.5/appicon.html"&gt;Setting the Application Icon&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2149729862162628363-5404125401511031568?l=qtcreator.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtcreator.blogspot.com/feeds/5404125401511031568/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qtcreator.blogspot.com/2009/10/application-icon-on-windows.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2149729862162628363/posts/default/5404125401511031568'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2149729862162628363/posts/default/5404125401511031568'/><link rel='alternate' type='text/html' href='http://qtcreator.blogspot.com/2009/10/application-icon-on-windows.html' title='Application Icon on Windows'/><author><name>Rob Caldecott</name><uri>http://www.blogger.com/profile/16139053405031925765</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='18' src='http://bp3.blogger.com/_4pUyapZ-mEE/R18XPrI851I/AAAAAAAAAUs/ok7oOC8z2o4/S220/rec.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2149729862162628363.post-5056760654365877704</id><published>2009-10-14T13:37:00.000+01:00</published><updated>2009-10-14T13:38:33.962+01:00</updated><title type='text'>Qt Creator 1.3 Beta</title><content type='html'>Get it while it's hot!&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://qt.nokia.com/developer/qt-creator-1.3-preview"&gt;http://qt.nokia.com/developer/qt-creator-1.3-preview&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2149729862162628363-5056760654365877704?l=qtcreator.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtcreator.blogspot.com/feeds/5056760654365877704/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qtcreator.blogspot.com/2009/10/qt-creator-13-beta.html#comment-form' title='8 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2149729862162628363/posts/default/5056760654365877704'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2149729862162628363/posts/default/5056760654365877704'/><link rel='alternate' type='text/html' href='http://qtcreator.blogspot.com/2009/10/qt-creator-13-beta.html' title='Qt Creator 1.3 Beta'/><author><name>Rob Caldecott</name><uri>http://www.blogger.com/profile/16139053405031925765</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='18' src='http://bp3.blogger.com/_4pUyapZ-mEE/R18XPrI851I/AAAAAAAAAUs/ok7oOC8z2o4/S220/rec.png'/></author><thr:total>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2149729862162628363.post-25303305621900578</id><published>2009-10-13T09:54:00.003+01:00</published><updated>2009-10-13T10:04:33.571+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='dll msvc'/><title type='text'>Shipping Qt DLLs</title><content type='html'>If you're using Windows and you want to ship a Qt application then, unless you're statically linking, you'll need to ship some Qt DLL files.  Be warned - there are two sets of these files installed with the Qt Creator SDK and only the ones found in the &lt;b&gt;qt\bin&lt;/b&gt; folder will work.  This set of DLLs have been built using the MinGW compiler, which is the one used by default when you build a project using Qt Creator.  However, the set found in the &lt;b&gt;bin&lt;/b&gt; folder (and Qt Creator itself) are built using MSVC and are essentially private to Qt Creator - shipping these instead will result in &lt;b&gt;DLL Entry Point Not Found&lt;/b&gt; errors when you launch your application.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Now, this begs the question - why is Qt Creator built using MSVC?  Isn't MinGW up to the task?  Good question.  The version of MinGW that ships with the Qt 4.5 SDK is quite an old release and the MSVC compiler generates much smaller files (and arguably generates better code.)  I guess the Nokia team wanted to ensure that their flagship tools use the best compiler for each platform.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Whether the forthcoming MinGW update due to be shipped with Qt 4.6 later this year does a much better job or not remains to be seen.  It will be interesting to see which compiler they decide to built their toolset with...&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2149729862162628363-25303305621900578?l=qtcreator.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtcreator.blogspot.com/feeds/25303305621900578/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qtcreator.blogspot.com/2009/10/shipping-qt-dlls.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2149729862162628363/posts/default/25303305621900578'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2149729862162628363/posts/default/25303305621900578'/><link rel='alternate' type='text/html' href='http://qtcreator.blogspot.com/2009/10/shipping-qt-dlls.html' title='Shipping Qt DLLs'/><author><name>Rob Caldecott</name><uri>http://www.blogger.com/profile/16139053405031925765</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='18' src='http://bp3.blogger.com/_4pUyapZ-mEE/R18XPrI851I/AAAAAAAAAUs/ok7oOC8z2o4/S220/rec.png'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2149729862162628363.post-5907059124950267223</id><published>2009-10-12T11:38:00.002+01:00</published><updated>2009-10-12T11:50:50.125+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='qmake'/><title type='text'>Generating Automatic Version Numbers</title><content type='html'>All of my projects use a special version numbering scheme - &lt;i&gt;major.minor.revision.build&lt;/i&gt; - &lt;i&gt;revision&lt;/i&gt; is the Subversion revision and &lt;i&gt;build&lt;/i&gt; is a build number based on the current date.  Whenever I build a project I want this version number to be updated automatically (if it has changed), but making this work using QMake isn't obvious ... but once you know how, it could be used for a variety of different uses.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I have a special Qt-based EXE project that generates the version number by creating a &lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;version.h&lt;/span&gt; file that looks something like this:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;#ifndef VERSION_H&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;#define VERSION_H&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;namespace Version&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;static const int MAJOR = 1;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;static const int MINOR = 2;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;static const int REVISION = 2572;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;static const int BUILD = 15280;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;#endif // VERSION_H&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I then &lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;#include&lt;/span&gt; this header where necessary.  The EXE is passed the major/minor version number and the name of the output file (e.g. &lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;version.h&lt;/span&gt;) and it extracts the SVN revision and generates the special build number.  I'll spare you the code - all you need to know is how to ensure this EXE is launched each time I build a project that requires it.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;First, I use a &lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;subdirs&lt;/span&gt; project that contains the version-generator .pro file, ensuring I have a version.exe file to execute.  Then, in my main apps .pro file I have something like this:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;MAJOR = 1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;MINOR = 2&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;VERSION_HEADER = ../version.h&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;versiontarget.target = $$VERSION_HEADER&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;versiontarget.commands = ../version/debug/version.exe $$MAJOR $$MINOR $$VERSION_HEADER&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;versiontarget.depends = FORCE&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;PRE_TARGETDEPS += $$VERSION_HEADER&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;QMAKE_EXTRA_TARGETS += versiontarget&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The &lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;MAJOR&lt;/span&gt; and &lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;MINOR&lt;/span&gt; definitions are changed by hand when required, the rest is automatic.  The key part here is the &lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;FORCE&lt;/span&gt; keyword - this is poorly (if at all?) documented and ensures that the &lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;QMAKE_EXTRA_TARGETS&lt;/span&gt; command works every time.  Extending this scheme to run additional targets would be simple - create another 'target' type and add it to the list (for example, you may want to launch a shell script that generates some code, etc.)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Getting this to work involved a lot of StackOverflow/Qt-list posts - I hope you find it useful.&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2149729862162628363-5907059124950267223?l=qtcreator.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtcreator.blogspot.com/feeds/5907059124950267223/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qtcreator.blogspot.com/2009/10/generating-automatic-version-numbers.html#comment-form' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2149729862162628363/posts/default/5907059124950267223'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2149729862162628363/posts/default/5907059124950267223'/><link rel='alternate' type='text/html' href='http://qtcreator.blogspot.com/2009/10/generating-automatic-version-numbers.html' title='Generating Automatic Version Numbers'/><author><name>Rob Caldecott</name><uri>http://www.blogger.com/profile/16139053405031925765</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='18' src='http://bp3.blogger.com/_4pUyapZ-mEE/R18XPrI851I/AAAAAAAAAUs/ok7oOC8z2o4/S220/rec.png'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2149729862162628363.post-685925633625567346</id><published>2009-10-12T11:33:00.002+01:00</published><updated>2009-10-12T11:36:15.350+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='qmake'/><category scheme='http://www.blogger.com/atom/ns#' term='unit-testing'/><title type='text'>Automatically Running Unit Tests</title><content type='html'>&lt;div&gt;&lt;span class="Apple-style-span"   style="font-family:Arial;font-size:130%;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px;"&gt;&lt;div&gt;QMake supports a useful post link step via the &lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;QMAKE_POST_LINK&lt;/span&gt; keyword that allows you to execute a command once your project has been built.  One handy use for this is to execute unit tests - simply add something similar to your .pro file:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;CONFIG(debug, debug|release) {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;QMAKE_POST_LINK = ./debug/$${TARGET}.exe&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;else {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;QMAKE_POST_LINK = ./release/$${TARGET}.exe&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;When linking is complete the appropriate EXE will be launched, and your tests will run (note that the above would need to be changed for Unix/Mac builds as the .exe file won't exist - I'll leave this as a lesson for the user.)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;You can use this in conjunction with a &lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;subdirs&lt;/span&gt; project to ensure that your tests are executed whenever any of the code they reference changes.&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2149729862162628363-685925633625567346?l=qtcreator.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtcreator.blogspot.com/feeds/685925633625567346/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qtcreator.blogspot.com/2009/10/automatically-running-unit-tests.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2149729862162628363/posts/default/685925633625567346'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2149729862162628363/posts/default/685925633625567346'/><link rel='alternate' type='text/html' href='http://qtcreator.blogspot.com/2009/10/automatically-running-unit-tests.html' title='Automatically Running Unit Tests'/><author><name>Rob Caldecott</name><uri>http://www.blogger.com/profile/16139053405031925765</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='18' src='http://bp3.blogger.com/_4pUyapZ-mEE/R18XPrI851I/AAAAAAAAAUs/ok7oOC8z2o4/S220/rec.png'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2149729862162628363.post-5713991075051376757</id><published>2009-10-06T11:37:00.003+01:00</published><updated>2009-10-06T11:41:51.328+01:00</updated><title type='text'>Qt Creator 1.2.91</title><content type='html'>The latest snapshot of v1.2.91 will group your project source files into &lt;b&gt;Forms&lt;/b&gt;, &lt;b&gt;Headers&lt;/b&gt;, &lt;b&gt;Resources&lt;/b&gt; and &lt;b&gt;Sources&lt;/b&gt; which is very useful indeed.  Get it here:&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;ftp://ftp.qtsoftware.com/qtcreator/snapshots/&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;img src="http://3.bp.blogspot.com/_4pUyapZ-mEE/Ssse31USRiI/AAAAAAAACBE/tqzRzRXZwXg/s400/qt.png" style="cursor:pointer; cursor:hand;width: 210px; height: 202px;" border="0" alt="" id="BLOGGER_PHOTO_ID_5389435323632731682" /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2149729862162628363-5713991075051376757?l=qtcreator.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtcreator.blogspot.com/feeds/5713991075051376757/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qtcreator.blogspot.com/2009/10/qt-creator-1291.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2149729862162628363/posts/default/5713991075051376757'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2149729862162628363/posts/default/5713991075051376757'/><link rel='alternate' type='text/html' href='http://qtcreator.blogspot.com/2009/10/qt-creator-1291.html' title='Qt Creator 1.2.91'/><author><name>Rob Caldecott</name><uri>http://www.blogger.com/profile/16139053405031925765</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='18' src='http://bp3.blogger.com/_4pUyapZ-mEE/R18XPrI851I/AAAAAAAAAUs/ok7oOC8z2o4/S220/rec.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_4pUyapZ-mEE/Ssse31USRiI/AAAAAAAACBE/tqzRzRXZwXg/s72-c/qt.png' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2149729862162628363.post-1400634510936147846</id><published>2009-10-05T20:12:00.003+01:00</published><updated>2009-10-05T20:40:02.641+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='unit-testing'/><title type='text'>Running Multiple Unit Tests</title><content type='html'>Qt Creator supports creating a unit test project but the Qt documentation only describes running a single test.  To run multiple tests you need to modify your &lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;main&lt;/span&gt; function to create an instance of each test object and then call &lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;qExec&lt;/span&gt; on it.  Easy enough, but when you start creating lots of tests it's easy to forget to add the necessary code.  I decided to simplify this process and came up with a small header file that you can use to make running multiple tests a breeze.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The code for the header, &lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;AutoTest.h&lt;/span&gt; can be found below.  To use it, simply:&lt;/div&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;Add a &lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;#include "AutoTest.h"&lt;/span&gt; to all your &lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;QObject&lt;/span&gt;-derived test headers.&lt;/li&gt;&lt;li&gt;Add &lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;DECLARE_TEST(YourTestClassName)&lt;/span&gt; below your class definition.&lt;/li&gt;&lt;li&gt;Change your &lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;main.cpp&lt;/span&gt; to look like this:&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;#include "AutoTest.h"&lt;br /&gt;&lt;br /&gt;TEST_MAIN&lt;/span&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;Easy.  If you still need to supply your own &lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;main&lt;/span&gt; function (you might have other initialization code in here) then you can run all the tests with the following line of code:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;    AutoTest::run(argv, argc);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This function will return 0 if all the tests passed.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The source for &lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;AutoTest.h&lt;/span&gt;:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;#ifndef AUTOTEST_H&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;#define AUTOTEST_H&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;div&gt;#include &amp;lt;QTest&amp;gt;&lt;/div&gt;&lt;div&gt;#include &amp;lt;QList&amp;gt;&lt;/div&gt;&lt;div&gt;#include &amp;lt;QString&amp;gt;&lt;/div&gt;&lt;div&gt;#include &amp;lt;QSharedPointer&amp;gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;namespace AutoTest&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;typedef QList&amp;lt;QObject*&amp;gt;&lt;qobject*&gt; TestList;&lt;/qobject*&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;inline TestList&amp;amp; testList()&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;static TestList list;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;return list;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;inline bool findObject(QObject* object)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;TestList&amp;amp; list = testList();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;if (list.contains(object))&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;return true;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;foreach (QObject* test, list)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;if (test-&gt;objectName() == object-&gt;objectName())&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;    &lt;/span&gt;return true;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;return false;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;inline void addTest(QObject* object)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;TestList&amp;amp; list = testList();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;if (!findObject(object))&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;list.append(object);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;inline int run(int argc, char *argv[])&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;int ret = 0;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;foreach (QObject* test, testList())&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;ret += QTest::qExec(test, argc, argv);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;return ret;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;template &amp;lt;class T&amp;gt;&lt;class&gt;&lt;/class&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;class Test&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;public:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;QSharedPointer&amp;lt;T&amp;gt;&lt;t&gt; child;&lt;/t&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;Test(const QString&amp;amp; name) : child(new T)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;child-&gt;setObjectName(name);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;AutoTest::addTest(child.data());&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;};&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;#define DECLARE_TEST(className) static Test&amp;lt;className&amp;gt;&lt;classname&gt; t(#className);&lt;/classname&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;#define TEST_MAIN \&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;int main(int argc, char *argv[]) \&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;{ \&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;return AutoTest::run(argc, argv); \&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;#endif // AUTOTEST_H&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;A typical test class header would look something like this:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;#ifndef FOOTESTS_H&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;#define FOOTESTS_H&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;#include "AutoTest.h"&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;class FooTests : public QObject&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;Q_OBJECT&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;private slots:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;void initTestCase();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;void test1();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;void test2();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;void cleanupTestCase();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;};&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;DECLARE_TEST(FooTests)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;#endif // FOOTESTS_H&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Apologies for the formatting - haven't worked out how to post decent looking code using blogger yet.&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2149729862162628363-1400634510936147846?l=qtcreator.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtcreator.blogspot.com/feeds/1400634510936147846/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qtcreator.blogspot.com/2009/10/running-multiple-unit-tests.html#comment-form' title='10 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2149729862162628363/posts/default/1400634510936147846'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2149729862162628363/posts/default/1400634510936147846'/><link rel='alternate' type='text/html' href='http://qtcreator.blogspot.com/2009/10/running-multiple-unit-tests.html' title='Running Multiple Unit Tests'/><author><name>Rob Caldecott</name><uri>http://www.blogger.com/profile/16139053405031925765</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='18' src='http://bp3.blogger.com/_4pUyapZ-mEE/R18XPrI851I/AAAAAAAAAUs/ok7oOC8z2o4/S220/rec.png'/></author><thr:total>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2149729862162628363.post-5298173750716237390</id><published>2009-10-05T15:20:00.001+01:00</published><updated>2009-10-05T15:22:13.184+01:00</updated><title type='text'>Ctrl+Click</title><content type='html'>How did I miss this?  Hold down the Ctrl key and when you hover over a symbol with the mouse, it changes to a hyperlink - click it to go to the symbol definition.  Brilliant!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2149729862162628363-5298173750716237390?l=qtcreator.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtcreator.blogspot.com/feeds/5298173750716237390/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qtcreator.blogspot.com/2009/10/ctrlclick.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2149729862162628363/posts/default/5298173750716237390'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2149729862162628363/posts/default/5298173750716237390'/><link rel='alternate' type='text/html' href='http://qtcreator.blogspot.com/2009/10/ctrlclick.html' title='Ctrl+Click'/><author><name>Rob Caldecott</name><uri>http://www.blogger.com/profile/16139053405031925765</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='18' src='http://bp3.blogger.com/_4pUyapZ-mEE/R18XPrI851I/AAAAAAAAAUs/ok7oOC8z2o4/S220/rec.png'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2149729862162628363.post-5544510321299388178</id><published>2009-10-05T15:15:00.002+01:00</published><updated>2009-10-05T15:20:32.627+01:00</updated><title type='text'>Qt Creator 1.2.90</title><content type='html'>There is a Qt Creator Technology Snapshot available - version 1.2.90.  It's well worth upgrading.  Goodies include &lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;#include&lt;/span&gt; completion and local symbol rename feature.  You can also supply a template to use when creating new .cpp/.h files - the contents of the specified template file are inserted at the top of the file.  I have a very simple one that adds the Subversion &lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;$Id$&lt;/span&gt; tag.  Very handy.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2149729862162628363-5544510321299388178?l=qtcreator.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtcreator.blogspot.com/feeds/5544510321299388178/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qtcreator.blogspot.com/2009/10/qt-creator-1290.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2149729862162628363/posts/default/5544510321299388178'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2149729862162628363/posts/default/5544510321299388178'/><link rel='alternate' type='text/html' href='http://qtcreator.blogspot.com/2009/10/qt-creator-1290.html' title='Qt Creator 1.2.90'/><author><name>Rob Caldecott</name><uri>http://www.blogger.com/profile/16139053405031925765</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='18' src='http://bp3.blogger.com/_4pUyapZ-mEE/R18XPrI851I/AAAAAAAAAUs/ok7oOC8z2o4/S220/rec.png'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2149729862162628363.post-6699007338034475923</id><published>2009-10-05T15:11:00.002+01:00</published><updated>2009-10-05T15:15:22.932+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='qmake'/><title type='text'>Project Not Linked When Dependent Library Changes - Update</title><content type='html'>&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;PRE_TARGETDEPS&lt;/span&gt; fixes this linking issue.  You need to add something similar to the following to your .pro file that uses a static library:&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;PRE_TARGETDEPS += ../path/to/your/lib.a&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This will ensure that if your lib changes (but not the project using it), everything will be correctly relinked.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Bit of a hack, but this is not unusual with qmake.  :)&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2149729862162628363-6699007338034475923?l=qtcreator.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtcreator.blogspot.com/feeds/6699007338034475923/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qtcreator.blogspot.com/2009/10/project-not-linked-when-dependent.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2149729862162628363/posts/default/6699007338034475923'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2149729862162628363/posts/default/6699007338034475923'/><link rel='alternate' type='text/html' href='http://qtcreator.blogspot.com/2009/10/project-not-linked-when-dependent.html' title='Project Not Linked When Dependent Library Changes - Update'/><author><name>Rob Caldecott</name><uri>http://www.blogger.com/profile/16139053405031925765</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='18' src='http://bp3.blogger.com/_4pUyapZ-mEE/R18XPrI851I/AAAAAAAAAUs/ok7oOC8z2o4/S220/rec.png'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2149729862162628363.post-893640288863985714</id><published>2009-07-20T21:36:00.003+01:00</published><updated>2009-07-20T21:39:57.817+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='gdb debugging-helpers typedef'/><title type='text'>Gdb Typedef Bug - Update</title><content type='html'>Looks like the gdb typedef debugging helper issue isn't going to be easy to fix:&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://lists.trolltech.com/pipermail/qt-creator/2009-July/003920.html" style="text-decoration: none;"&gt;http://lists.trolltech.com/pipermail/qt-creator/2009-July/003920.html&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;blockquote&gt;&lt;div&gt;The type reported by gdb is 'List'. I could resolve this to 'QList&lt;int&gt;' 'manually', However, doing so would generally impact the debugging helper performance as this would need an additional roundtrip for each item in the Locals&amp;amp;Watchers view (and an roundtrip takes several dozen milliseconds even on fast machines, so we are talking about slowing down each 'step' by a second or so.)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;You can get a 'nice' display of list2 'manually' by creating a 'Watcher' with expression   *('QList&lt;int&gt;'*)&amp;amp;list2  .&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I understand this is neither obvious nor convenient, but I am also a bit afraid of the general slowdown.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;So for now I am tempted to leave it as it is.&lt;/div&gt;&lt;/blockquote&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;The manual watcher tip is one to remember.&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2149729862162628363-893640288863985714?l=qtcreator.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtcreator.blogspot.com/feeds/893640288863985714/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qtcreator.blogspot.com/2009/07/gdb-typedef-bug-update.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2149729862162628363/posts/default/893640288863985714'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2149729862162628363/posts/default/893640288863985714'/><link rel='alternate' type='text/html' href='http://qtcreator.blogspot.com/2009/07/gdb-typedef-bug-update.html' title='Gdb Typedef Bug - Update'/><author><name>Rob Caldecott</name><uri>http://www.blogger.com/profile/16139053405031925765</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='18' src='http://bp3.blogger.com/_4pUyapZ-mEE/R18XPrI851I/AAAAAAAAAUs/ok7oOC8z2o4/S220/rec.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2149729862162628363.post-3442300191385268560</id><published>2009-07-20T07:45:00.001+01:00</published><updated>2009-07-20T07:47:45.775+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='books'/><title type='text'>The Qt Bible</title><content type='html'>If you're new to Qt development then you &lt;b&gt;must&lt;/b&gt; buy this book - I really cannot recommend it highly enough.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://www.amazon.co.uk/Programming-Prentice-Source-Software-Development/dp/0132354160/ref=sr_1_1?ie=UTF8&amp;amp;s=books&amp;amp;qid=1248072398&amp;amp;sr=8-1"&gt;C++ GUI Programming with Qt4&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2149729862162628363-3442300191385268560?l=qtcreator.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtcreator.blogspot.com/feeds/3442300191385268560/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qtcreator.blogspot.com/2009/07/qt-bible.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2149729862162628363/posts/default/3442300191385268560'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2149729862162628363/posts/default/3442300191385268560'/><link rel='alternate' type='text/html' href='http://qtcreator.blogspot.com/2009/07/qt-bible.html' title='The Qt Bible'/><author><name>Rob Caldecott</name><uri>http://www.blogger.com/profile/16139053405031925765</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='18' src='http://bp3.blogger.com/_4pUyapZ-mEE/R18XPrI851I/AAAAAAAAAUs/ok7oOC8z2o4/S220/rec.png'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2149729862162628363.post-7063323792344517871</id><published>2009-07-19T20:20:00.002+01:00</published><updated>2009-07-19T20:26:30.061+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='help'/><title type='text'>Context-Sensitive Help</title><content type='html'>The Qt help is superb and makes the MSDN help in Visual Studio look like the dog we all know it is (every C++ developer knows that the MSDN has sucked since the MSVC 6 days).  However, the context-sensitive help in Qt Creator doesn't always do what you'd expect.  For example, if you have a &lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;#include&lt;/span&gt; selected, F1 will not display the relevant help page, which is a shame.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;#include &amp;lt;QString&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Put your cursor between the braces and hit F1.  I would expect the QString help page to appear, but instead I get &lt;b&gt;No documentation available&lt;/b&gt;.  Hardly the end of the world, but little touches like this would add even more shine to an already shiny IDE.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2149729862162628363-7063323792344517871?l=qtcreator.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtcreator.blogspot.com/feeds/7063323792344517871/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qtcreator.blogspot.com/2009/07/context-sensitive-help.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2149729862162628363/posts/default/7063323792344517871'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2149729862162628363/posts/default/7063323792344517871'/><link rel='alternate' type='text/html' href='http://qtcreator.blogspot.com/2009/07/context-sensitive-help.html' title='Context-Sensitive Help'/><author><name>Rob Caldecott</name><uri>http://www.blogger.com/profile/16139053405031925765</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='18' src='http://bp3.blogger.com/_4pUyapZ-mEE/R18XPrI851I/AAAAAAAAAUs/ok7oOC8z2o4/S220/rec.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2149729862162628363.post-9150436551786608131</id><published>2009-07-19T20:14:00.001+01:00</published><updated>2009-07-19T20:15:54.590+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='gdb breakpoint'/><title type='text'>Delete All Breakpoints?</title><content type='html'>There is no way to delete (or disable) all breakpoints in Qt Creator - they have to be disabled individually.  Ack.  I would find such a feature very useful.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2149729862162628363-9150436551786608131?l=qtcreator.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtcreator.blogspot.com/feeds/9150436551786608131/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qtcreator.blogspot.com/2009/07/delete-all-breakpoints.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2149729862162628363/posts/default/9150436551786608131'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2149729862162628363/posts/default/9150436551786608131'/><link rel='alternate' type='text/html' href='http://qtcreator.blogspot.com/2009/07/delete-all-breakpoints.html' title='Delete All Breakpoints?'/><author><name>Rob Caldecott</name><uri>http://www.blogger.com/profile/16139053405031925765</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='18' src='http://bp3.blogger.com/_4pUyapZ-mEE/R18XPrI851I/AAAAAAAAAUs/ok7oOC8z2o4/S220/rec.png'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2149729862162628363.post-4802505378214629697</id><published>2009-07-19T19:36:00.004+01:00</published><updated>2009-07-19T19:52:49.260+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='gdb debugging-helpers typedef'/><title type='text'>Debugging Helpers typedef Bug</title><content type='html'>Debugging helpers are great.  They show you the contents of common Qt types such as maps, lists and strings and are invaluble when debugging code.  However, a bug exists that means if you &lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;typedef&lt;/span&gt; a &lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;QMap&lt;/span&gt;, &lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;QList&lt;/span&gt;, etc. then the debugging helper won't work.  Take the following example:&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;#include &amp;lt;QtCore/QCoreApplication&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;#include &amp;lt;QMap&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;#include &amp;lt;QString&amp;gt;&lt;/span&gt;&lt;/p&gt; &lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;#include &amp;lt;QListv&lt;/span&gt;&lt;/p&gt; &lt;p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"&gt;&lt;/p&gt; &lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;int main(int argc, char *argv[])&lt;/span&gt;&lt;/p&gt; &lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:256;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;{&lt;/span&gt;&lt;/p&gt; &lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:256;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;QCoreApplication a(argc, argv);&lt;/span&gt;&lt;/p&gt; &lt;p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"&gt;&lt;/p&gt; &lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:256;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;QMap&amp;lt;QString, QString&amp;gt; map1; &lt;/span&gt;&lt;/p&gt;&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:256;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;map1["Hello"] = "World!";&lt;/span&gt;&lt;/p&gt; &lt;p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"&gt;&lt;/p&gt; &lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:256;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;  &lt;/span&gt;&lt;/p&gt;&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:256;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:256;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;typedef QMap&amp;lt;QString, QString&amp;gt; Map;&lt;/span&gt;&lt;/p&gt; &lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:256;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;Map map2;&lt;/span&gt;&lt;/p&gt; &lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:256;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;map2["Hello"] = "World!";&lt;/span&gt;&lt;/p&gt; &lt;p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"&gt;&lt;/p&gt; &lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:256;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;  &lt;/span&gt;&lt;/p&gt;&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:256;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:256;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;QList&amp;lt;int&amp;gt; list1;&lt;/span&gt;&lt;/p&gt; &lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:256;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;list1.append(1234);&lt;/span&gt;&lt;/p&gt; &lt;p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"&gt;&lt;/p&gt; &lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:256;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;  &lt;/span&gt;&lt;/p&gt;&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:256;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:256;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;typedef &amp;lt;int&amp;gt; List;&lt;/span&gt;&lt;/p&gt; &lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:256;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;List list2;&lt;/span&gt;&lt;/p&gt; &lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:256;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;list2.append(1234);&lt;/span&gt;&lt;/p&gt; &lt;p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"&gt;&lt;/p&gt; &lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:256;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;return a.exec();&lt;/span&gt;&lt;/p&gt; &lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;}&lt;/span&gt;&lt;/p&gt;&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"&gt;If you stick a breakpoint on the last line the debugger happily displays the contents of &lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;map1&lt;/span&gt; and &lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;list1&lt;/span&gt;, but not &lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;map2&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt; &lt;/span&gt;and &lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;list2&lt;/span&gt; as they have been declared using the typedef.  Now, I use the &lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;typedef&lt;/span&gt; keyword a lot, so this is a PITA, but it's been reported so I'm sure a fix is in the works.&lt;/p&gt;&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"&gt;&lt;img src="http://4.bp.blogspot.com/_4pUyapZ-mEE/SmNrTBXqBQI/AAAAAAAAB4U/YrnP46Ub-kQ/s400/debug.JPG" style="cursor:pointer; cursor:hand;width: 344px; height: 306px;" border="0" alt="" id="BLOGGER_PHOTO_ID_5360245956030366978" /&gt;&lt;/p&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2149729862162628363-4802505378214629697?l=qtcreator.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtcreator.blogspot.com/feeds/4802505378214629697/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qtcreator.blogspot.com/2009/07/debugging-helpers-typedef-bug.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2149729862162628363/posts/default/4802505378214629697'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2149729862162628363/posts/default/4802505378214629697'/><link rel='alternate' type='text/html' href='http://qtcreator.blogspot.com/2009/07/debugging-helpers-typedef-bug.html' title='Debugging Helpers typedef Bug'/><author><name>Rob Caldecott</name><uri>http://www.blogger.com/profile/16139053405031925765</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='18' src='http://bp3.blogger.com/_4pUyapZ-mEE/R18XPrI851I/AAAAAAAAAUs/ok7oOC8z2o4/S220/rec.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_4pUyapZ-mEE/SmNrTBXqBQI/AAAAAAAAB4U/YrnP46Ub-kQ/s72-c/debug.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2149729862162628363.post-4838288613852907730</id><published>2009-07-19T14:11:00.002+01:00</published><updated>2009-07-19T14:16:28.124+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='gdb dell'/><title type='text'>Debugging With gdb Using A Dell Laptop</title><content type='html'>When I started out with Qt Creator I had a big show-stopping problem debugging apps on my Dell work laptop.  I thought I'd post my original messages to the mailing list in case anyone else suffers from the same problem.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;**********&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;I have Qt Creator 1.1.1 running on Windows XP and I cannot debug GUI apps.  As soon as I start the debugger, it stops with 'signal-received' somewhere in C:\WINDOWS\system32\wxvault.dll. Further up the call stack is 'QGraphicsWidget::paintWindowFrame'.  Here is what I am getting:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;0&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;wxvault!??0Cwxvault@@QAE at XZ&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;C:\\WINDOWS\\system32\\wxvault.dll&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;0&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;1&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;??&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;0&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;2&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;??&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;0&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;3&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;??&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;0&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;4&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;??&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;0&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;5&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;??&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;0&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;6&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;??&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;0&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;7&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;QGraphicsWidget::paintWindowFrame&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;qgraphicswidget.cpp&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;2184&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;8&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;wxvault!??0Cwxvault@@QAE at XZ&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;C:\\WINDOWS\\system32\\wxvault.dll&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;0&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;9&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;??&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;0&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;10&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;wxvault!??0Cwxvault@@QAE at XZ&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;C:\\WINDOWS\\system32\\wxvault.dll&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;0&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;11&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;??&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;0&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This is my first day with Qt Creator and not being able to debug is a show stopper.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;My version of gdb is the one that ships with QT Creator, v6.8.  I can run my app fine with Ctrl+R.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;**********&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;OK, I found the problem - a package called 'Embassy Security Center' by 'Wave Systems'.  This comes pre-installed on most Dell's.  Instead of uninstalling it (which I'm told will cause me a lot of grief) I stopped the &lt;b&gt;wxvault.dll&lt;/b&gt; being loaded with other DLLs by editing&lt;/div&gt;&lt;div&gt;   &lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Windows\AppInit_DLLs&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;/span&gt; (the DLL was in this list).  Removing it makes gdb play nicely.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://lists.trolltech.com/pipermail/qt-creator/2009-May/003178.html"&gt;http://lists.trolltech.com/pipermail/qt-creator/2009-May/003178.html&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2149729862162628363-4838288613852907730?l=qtcreator.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtcreator.blogspot.com/feeds/4838288613852907730/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qtcreator.blogspot.com/2009/07/debugging-with-gdb-using-dell-laptop.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2149729862162628363/posts/default/4838288613852907730'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2149729862162628363/posts/default/4838288613852907730'/><link rel='alternate' type='text/html' href='http://qtcreator.blogspot.com/2009/07/debugging-with-gdb-using-dell-laptop.html' title='Debugging With gdb Using A Dell Laptop'/><author><name>Rob Caldecott</name><uri>http://www.blogger.com/profile/16139053405031925765</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='18' src='http://bp3.blogger.com/_4pUyapZ-mEE/R18XPrI851I/AAAAAAAAAUs/ok7oOC8z2o4/S220/rec.png'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2149729862162628363.post-6381391770976284685</id><published>2009-07-19T14:08:00.002+01:00</published><updated>2009-07-19T14:10:06.806+01:00</updated><title type='text'>Unit Test Results In The Application Output Pane</title><content type='html'>&lt;div&gt;I would find it really useful if when displaying the results of a QTestLib app in the Application Output pane I could double-click on a &lt;b&gt;FAIL!&lt;/b&gt; to jump directly to the test that failed.  Once you have a lot of tests, this feature would prove to be a real time-saver.  FWIW I have used the Boost.Test framework with MSVC in the past and you can do something similar.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;For example, consider the following output from a test run (this is copied directly from the Application Output pane in Qt Creator):&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;********* Start testing of LogFileTests *********&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;Config: Using QTest library 4.5.1, Qt 4.5.1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;PASS   : LogFileTests::initTestCase()&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;FAIL!  : LogFileTests::LoadFile() 'entries.last() == LogEntry("Test")'&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;returned FALSE. ()&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;LogFileTests.cpp(30) : failure location&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;PASS   : LogFileTests::cleanupTestCase()&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;Totals: 2 passed, 1 failed, 0 skipped&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;********* Finished testing of LogFileTests *********&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If I could double-click on either the FAIL! line or the line below (&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;LogFileTests.cpp(30) : failure location&lt;/span&gt;) and jump straight to the test, I would be very happy.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2149729862162628363-6381391770976284685?l=qtcreator.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtcreator.blogspot.com/feeds/6381391770976284685/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qtcreator.blogspot.com/2009/07/unit-test-results-in-application-output.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2149729862162628363/posts/default/6381391770976284685'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2149729862162628363/posts/default/6381391770976284685'/><link rel='alternate' type='text/html' href='http://qtcreator.blogspot.com/2009/07/unit-test-results-in-application-output.html' title='Unit Test Results In The Application Output Pane'/><author><name>Rob Caldecott</name><uri>http://www.blogger.com/profile/16139053405031925765</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='18' src='http://bp3.blogger.com/_4pUyapZ-mEE/R18XPrI851I/AAAAAAAAAUs/ok7oOC8z2o4/S220/rec.png'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2149729862162628363.post-8332529591015985973</id><published>2009-07-19T14:00:00.002+01:00</published><updated>2009-07-19T14:02:10.921+01:00</updated><title type='text'>Compiling a Single .cpp File</title><content type='html'>Qt Creator won't allow you to compile a single .cpp file - you have to build the the entire project - which is slightly annoying.  When working on a complicated source file I sometime like to let the compiler rip to make sure it compiles.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;However, a fix may be in the pipeline:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://lists.trolltech.com/pipermail/qt-creator/2009-July/003905.html"&gt;http://lists.trolltech.com/pipermail/qt-creator/2009-July/003905.html&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2149729862162628363-8332529591015985973?l=qtcreator.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtcreator.blogspot.com/feeds/8332529591015985973/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qtcreator.blogspot.com/2009/07/compiling-single-cpp-file.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2149729862162628363/posts/default/8332529591015985973'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2149729862162628363/posts/default/8332529591015985973'/><link rel='alternate' type='text/html' href='http://qtcreator.blogspot.com/2009/07/compiling-single-cpp-file.html' title='Compiling a Single .cpp File'/><author><name>Rob Caldecott</name><uri>http://www.blogger.com/profile/16139053405031925765</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='18' src='http://bp3.blogger.com/_4pUyapZ-mEE/R18XPrI851I/AAAAAAAAAUs/ok7oOC8z2o4/S220/rec.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2149729862162628363.post-727911376374164026</id><published>2009-07-19T00:24:00.002+01:00</published><updated>2009-07-19T00:28:23.685+01:00</updated><title type='text'>Latest Qt Creator Snapshots</title><content type='html'>If you want to grab the latest version of Qt Creator before it is released to the general public you can grab a copy using FTP from here:&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="ftp://ftp.qtsoftware.com/qtcreator/snapshots/"&gt;ftp://ftp.qtsoftware.com/qtcreator/snapshots/&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;You can also download the Qt Creator source and build it yourself - you can even build a copy of Qt Creator using Qt Creator!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://qt.gitorious.org/qt-creator/qt-creator/trees/master"&gt;http://qt.gitorious.org/qt-creator/qt-creator/trees/master&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2149729862162628363-727911376374164026?l=qtcreator.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtcreator.blogspot.com/feeds/727911376374164026/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qtcreator.blogspot.com/2009/07/latest-qt-creator-snapshots.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2149729862162628363/posts/default/727911376374164026'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2149729862162628363/posts/default/727911376374164026'/><link rel='alternate' type='text/html' href='http://qtcreator.blogspot.com/2009/07/latest-qt-creator-snapshots.html' title='Latest Qt Creator Snapshots'/><author><name>Rob Caldecott</name><uri>http://www.blogger.com/profile/16139053405031925765</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='18' src='http://bp3.blogger.com/_4pUyapZ-mEE/R18XPrI851I/AAAAAAAAAUs/ok7oOC8z2o4/S220/rec.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2149729862162628363.post-2686825061158808913</id><published>2009-07-19T00:03:00.003+01:00</published><updated>2009-07-19T00:19:29.084+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='gcc'/><title type='text'>MinGW/gcc 4.4</title><content type='html'>The current version of Qt Creator (1.2.1) ships with a free compiler based on &lt;a href="http://en.wikipedia.org/wiki/GNU_Compiler_Collection"&gt;gcc&lt;/a&gt; 3.4.5 which is now 5 years old.  This compiler is free, so I can't complain too much, but it generates EXE/DLL files which are much larger than their MSVC equivalents (usually 15%-20% larger, sometimes up to 50%) and, by all accounts, slower code.  Qt Creator itself is built using MSVC, and I have also built Qt from source using MSVC in both shared and static forms (details on how to do this next week.)  I tend to use the MinGW Qt toolset for debug builds (as the debugging helpers for gdb are better) and the static MSVC version of Qt for release builds.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;However, there is a new version of the &lt;a href="http://en.wikipedia.org/wiki/MinGW"&gt;MinGW&lt;/a&gt; toolset which includes a shiny new version of gcc (v4.4).  By all accounts this is a much faster compiler that generates better code.  This toolset will &lt;a href="http://labs.trolltech.com/blogs/2009/07/15/phonon-and-mingw-a-story-about-true-windows-love/"&gt;hopefully ship with Qt 4.6&lt;/a&gt;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Although MSVC is a superb compiler, I don't want to have to depend on it, so I look forward to gcc 4.4.  Having versions of Qt built with different compilers is an interesting exercise for the user but is ultimately a pain in the arse to manage.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Note that disabling support for exception handling can mean smaller executables when building with gcc, but I haven't tried this and am not sure how I can specify the relevant compiler options from Qt Creator itself.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2149729862162628363-2686825061158808913?l=qtcreator.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtcreator.blogspot.com/feeds/2686825061158808913/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qtcreator.blogspot.com/2009/07/mingwgcc-44.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2149729862162628363/posts/default/2686825061158808913'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2149729862162628363/posts/default/2686825061158808913'/><link rel='alternate' type='text/html' href='http://qtcreator.blogspot.com/2009/07/mingwgcc-44.html' title='MinGW/gcc 4.4'/><author><name>Rob Caldecott</name><uri>http://www.blogger.com/profile/16139053405031925765</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='18' src='http://bp3.blogger.com/_4pUyapZ-mEE/R18XPrI851I/AAAAAAAAAUs/ok7oOC8z2o4/S220/rec.png'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2149729862162628363.post-893634962631095633</id><published>2009-07-18T23:57:00.002+01:00</published><updated>2009-07-19T00:02:40.503+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='designer'/><title type='text'>Qt Designer Action Naming</title><content type='html'>This is a minor niggle... Qt uses &lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;camelCase&lt;/span&gt; throughout, but when adding menu items using the designer, ampersands are replaced with an underscore - I always end up renaming these.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;For example, if you add a menu item called &lt;b&gt;E&amp;amp;xit&lt;/b&gt; the designer will create a &lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;QAction&lt;/span&gt; &lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;called &lt;/span&gt;actionE_xit&lt;/span&gt;.  Bah.  Just ignore ampersands and call it &lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;actionExit&lt;/span&gt;. &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2149729862162628363-893634962631095633?l=qtcreator.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtcreator.blogspot.com/feeds/893634962631095633/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qtcreator.blogspot.com/2009/07/qt-designer-action-naming.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2149729862162628363/posts/default/893634962631095633'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2149729862162628363/posts/default/893634962631095633'/><link rel='alternate' type='text/html' href='http://qtcreator.blogspot.com/2009/07/qt-designer-action-naming.html' title='Qt Designer Action Naming'/><author><name>Rob Caldecott</name><uri>http://www.blogger.com/profile/16139053405031925765</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='18' src='http://bp3.blogger.com/_4pUyapZ-mEE/R18XPrI851I/AAAAAAAAAUs/ok7oOC8z2o4/S220/rec.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2149729862162628363.post-4273663449871557664</id><published>2009-07-18T23:49:00.003+01:00</published><updated>2009-07-18T23:55:17.941+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.pro sessions'/><title type='text'>Support For Workspaces?</title><content type='html'>I'm not convinced about the Qt Creator support for 'sessions'.  Currently, if I open a project and it depends on other projects, they won't be opened automatically, and the &lt;a href="http://lists.trolltech.com/pipermail/qt-creator/2009-July/003738.html"&gt;official advice&lt;/a&gt; is to use sessions to manage multiple projects.  The problem is that these sessions are not stored in the root project folder and hence can't be added to your version control system.  This is a pain.  If I am working on a project that contains a number of different .pro files, another member of my team would need to create their own duplicate session in Qt Creator if they wanted to work on the same code.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I think either a simple 'workspace' or 'solution' concept is required that will group projects together, or a way of creating a session file that can be stored in the root folder and added to version control.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Note that that may be a way to do this by hand-editing your .pro files, but I haven't investigated this yet.  I think the IDE should perform this task though...&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2149729862162628363-4273663449871557664?l=qtcreator.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtcreator.blogspot.com/feeds/4273663449871557664/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qtcreator.blogspot.com/2009/07/support-for-workspaces.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2149729862162628363/posts/default/4273663449871557664'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2149729862162628363/posts/default/4273663449871557664'/><link rel='alternate' type='text/html' href='http://qtcreator.blogspot.com/2009/07/support-for-workspaces.html' title='Support For Workspaces?'/><author><name>Rob Caldecott</name><uri>http://www.blogger.com/profile/16139053405031925765</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='18' src='http://bp3.blogger.com/_4pUyapZ-mEE/R18XPrI851I/AAAAAAAAAUs/ok7oOC8z2o4/S220/rec.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2149729862162628363.post-8609022668541835547</id><published>2009-07-18T23:36:00.002+01:00</published><updated>2009-07-18T23:43:39.998+01:00</updated><title type='text'>Project Not Linked When Dependent Library Changes</title><content type='html'>I recently found a bug that was driving me nuts.  If you have a project that depends on a separate .lib project, and you change the .lib but NOT the main project, when the main project builds it will correctly rebuild the .lib but will NOT re-link!  This means your library changes are not included and you end up confusing both yourself and the debugger.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I use unit tests in a big way (a good thing) and tend to have core code in a .lib which is used by both the main application and the unit test project.  One day last week a test failed so I fixed the code in the core lib and ran the tests EXE again ... which built the .lib but as it didn't link with it, the tests failed again.  Cue much head scratching.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I posted this to the Qt Creator mailing list.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://lists.trolltech.com/pipermail/qt-creator/2009-July/003851.html"&gt;http://lists.trolltech.com/pipermail/qt-creator/2009-July/003851.html&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;And at least one other user on the list was having a similar issue.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://lists.trolltech.com/pipermail/qt-creator/2009-July/003897.html"&gt;http://lists.trolltech.com/pipermail/qt-creator/2009-July/003897.html&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;One suggested workaround was to add a &lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;PRE_TARGETDEPS&lt;/span&gt; line to the .pro file which I will try when I am back in the office.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2149729862162628363-8609022668541835547?l=qtcreator.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtcreator.blogspot.com/feeds/8609022668541835547/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qtcreator.blogspot.com/2009/07/project-not-linked-when-dependent.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2149729862162628363/posts/default/8609022668541835547'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2149729862162628363/posts/default/8609022668541835547'/><link rel='alternate' type='text/html' href='http://qtcreator.blogspot.com/2009/07/project-not-linked-when-dependent.html' title='Project Not Linked When Dependent Library Changes'/><author><name>Rob Caldecott</name><uri>http://www.blogger.com/profile/16139053405031925765</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='18' src='http://bp3.blogger.com/_4pUyapZ-mEE/R18XPrI851I/AAAAAAAAAUs/ok7oOC8z2o4/S220/rec.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2149729862162628363.post-9054021838074267587</id><published>2009-07-18T23:28:00.000+01:00</published><updated>2009-07-18T23:33:20.477+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='debug feature-request'/><title type='text'>Debugging a Project</title><content type='html'>One feature I would find really useful in Qt Creator would be the ability to right-click on a project and select a &lt;b&gt;Debug&lt;/b&gt; option.  Currently to debug a project you need to first right-click on the project and select &lt;b&gt;Set Run Configuration&lt;/b&gt; before launching the debugger with &lt;b&gt;F5&lt;/b&gt; or via the &lt;b&gt;Debug&lt;/b&gt; menu.  When you have multiple projects loaded this is a bit of a pain (I always have a main project and a unit test project loaded for example.)&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2149729862162628363-9054021838074267587?l=qtcreator.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtcreator.blogspot.com/feeds/9054021838074267587/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qtcreator.blogspot.com/2009/07/debugging-project.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2149729862162628363/posts/default/9054021838074267587'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2149729862162628363/posts/default/9054021838074267587'/><link rel='alternate' type='text/html' href='http://qtcreator.blogspot.com/2009/07/debugging-project.html' title='Debugging a Project'/><author><name>Rob Caldecott</name><uri>http://www.blogger.com/profile/16139053405031925765</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='18' src='http://bp3.blogger.com/_4pUyapZ-mEE/R18XPrI851I/AAAAAAAAAUs/ok7oOC8z2o4/S220/rec.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2149729862162628363.post-5789280605726000157</id><published>2009-07-18T23:19:00.000+01:00</published><updated>2009-07-18T23:26:22.392+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.pro lib'/><title type='text'>Linking With Release/Debug Libraries</title><content type='html'>If you have a project that depends on a library project then you'll want the debug version to link with the debug library and the release version to link with the release library.  To do this you'll need to edit your main project's .pro file and do something like this:&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;debug {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;  LIBS += -L./libfolder -lmydebuglib.lib&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;release {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;  LIBS += -L./libfolder -lmyreleaselib.lib&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Note that the first brace &lt;b&gt;must&lt;/b&gt; appear on the same line as the configuration name - the following will cause qmake to error:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;debug&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;  LIBS += ...&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I posted a question about this on Stack Overflow as well as asking on the Qt Creator mailing list.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://stackoverflow.com/questions/1130106/linking-with-a-debug-release-lib-with-qmake-qt-creator"&gt;http://stackoverflow.com/questions/1130106/linking-with-a-debug-release-lib-with-qmake-qt-creator&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://lists.trolltech.com/pipermail/qt-creator/2009-July/003840.html"&gt;http://lists.trolltech.com/pipermail/qt-creator/2009-July/003840.html&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2149729862162628363-5789280605726000157?l=qtcreator.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtcreator.blogspot.com/feeds/5789280605726000157/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qtcreator.blogspot.com/2009/07/linking-with-releasedebug-libraries.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2149729862162628363/posts/default/5789280605726000157'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2149729862162628363/posts/default/5789280605726000157'/><link rel='alternate' type='text/html' href='http://qtcreator.blogspot.com/2009/07/linking-with-releasedebug-libraries.html' title='Linking With Release/Debug Libraries'/><author><name>Rob Caldecott</name><uri>http://www.blogger.com/profile/16139053405031925765</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='18' src='http://bp3.blogger.com/_4pUyapZ-mEE/R18XPrI851I/AAAAAAAAAUs/ok7oOC8z2o4/S220/rec.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2149729862162628363.post-2886014659347421239</id><published>2009-07-18T23:14:00.000+01:00</published><updated>2009-07-18T23:18:50.342+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='include .pro'/><title type='text'>Additional Include Folders</title><content type='html'>If you want to add additional include folders to your projects, then you need to edit the &lt;b&gt;.pro&lt;/b&gt; file by hand and add an entry like the following:&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: -webkit-monospace; font-size: 13px; white-space: pre; "&gt;INCLUDEPATH += [path]&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This is especially useful if like me, you add core code to a separate .lib project but you don;t want to use relative paths in your &lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;#include&lt;/span&gt; statements.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;You can add as many of these &lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;INCLUDEPATH&lt;/span&gt; statements as you like.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Eventually I'd like to see support for this in the IDE.  In fact, I'd go as far as saying the editor should expose lots more additional .pro functionality without the user having to edit these files themselves.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2149729862162628363-2886014659347421239?l=qtcreator.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtcreator.blogspot.com/feeds/2886014659347421239/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qtcreator.blogspot.com/2009/07/additional-include-folders.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2149729862162628363/posts/default/2886014659347421239'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2149729862162628363/posts/default/2886014659347421239'/><link rel='alternate' type='text/html' href='http://qtcreator.blogspot.com/2009/07/additional-include-folders.html' title='Additional Include Folders'/><author><name>Rob Caldecott</name><uri>http://www.blogger.com/profile/16139053405031925765</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='18' src='http://bp3.blogger.com/_4pUyapZ-mEE/R18XPrI851I/AAAAAAAAAUs/ok7oOC8z2o4/S220/rec.png'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2149729862162628363.post-6812196332121402671</id><published>2009-07-18T22:57:00.001+01:00</published><updated>2009-07-18T22:59:48.105+01:00</updated><title type='text'>Welcome</title><content type='html'>Welcome to my Qt Creator blog where I will document my experiences of this superb C++ IDE and framework.  I have recently started using Qt Creator and am so impressed that I have decided to blog about it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2149729862162628363-6812196332121402671?l=qtcreator.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtcreator.blogspot.com/feeds/6812196332121402671/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qtcreator.blogspot.com/2009/07/welcome.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2149729862162628363/posts/default/6812196332121402671'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2149729862162628363/posts/default/6812196332121402671'/><link rel='alternate' type='text/html' href='http://qtcreator.blogspot.com/2009/07/welcome.html' title='Welcome'/><author><name>Rob Caldecott</name><uri>http://www.blogger.com/profile/16139053405031925765</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='18' src='http://bp3.blogger.com/_4pUyapZ-mEE/R18XPrI851I/AAAAAAAAAUs/ok7oOC8z2o4/S220/rec.png'/></author><thr:total>0</thr:total></entry></feed>
