Nokia
Re-scaling QtSvgDialGauge's Tachometer skin
I've been experimenting with QtSvgDialGauge in a personal project, and so far, I like it a lot! :)
For those who don't know, QtSvgDialGauge is nice SVG-based dial/gauge widget, which is part of the Qt Embedded Widget demos. You can see it (and several other embedded widgets) in action in the Qt Embedded Widgets Catalog and Qt Patient Care Demo applications. And you can download the source for both applications here.
Now, the Qt Embedded Widget demos includes three SVG-based skins for the QtSvgDialGauge class: Tachometer, Thermometer, and Amperemeter...
Pre-pre-build commands with qmake
With most non-trivial Qt projects that I create, I like to include a pre-pre-build command in the qmake project file. I'll explain why as we go, but first off, let's look at what I mean by "pre-pre-build" (it is not at all a standard term).
The typical build process (as performed by make) looks something like this:
- For the given target, check if any of the target's dependencies have been updated since it was last (re)built.
- If no dependencies have changed, do nothing - we're done ;)
- If one or more dependencies have changed, then:
- Build each dependent target.
- Build this target.
- If appropriate, link this target with its dependencies.
That is, of course, a gross oversimplification... but it will do the purpose of this post.
Now, like most Qt developers, I use qmake to generate the Makefiles that drive the build process. Qmake, being an excellent tool, allows you to customise the generated Makefiles in many, many ways. For example, you can add custom commands to be executed just before or after the link step (1.b.3 above) via the QMAKE_PRE_LINK and QMAKE_POST_LINK variables.
However, qmake does not provide a QMAKE_PRE_BUILD variable for adding pre-build commands, and certainly no QMAKE_PRE_PRE_BUILD variable either. The former, it turns out, is pretty easy to achieve anyway, but the latter (the topic of this post) is a little bit trickier.
Recent comments
1 week 6 days ago
2 weeks 6 days ago
3 weeks 3 hours ago
3 weeks 6 days ago
4 weeks 4 hours ago
4 weeks 1 day ago
4 weeks 1 day ago
4 weeks 2 days ago
4 weeks 2 days ago
8 weeks 1 day ago