New Widget Collection

I have uploaded a modest collection of widgets that I have found useful to GitHub at It includes four widgets: LEDWidget, IPAddressWidget, VerticalLabel, and NeedleGauge. Please feel free to use them as you see fit.

All constructive feedback is welcome, click Like even!


An Animated Circular Gauge for QGraphicsView Framework

This article describes a simple animated round gauge I created for the Qt Graphics View Framework.  Despite the emphasis on QML nowadays, “old” Qt is still of value.  Lots of people use QGraphicsView still, so I thought this could be useful to people. Find the source at

The image below shows a static view of the CircularGaugeGraphicsObject. The outer white ring is the outline of the gauge, the red curved “bar” is a graphical representation of the value displayed by the gauge, and the red ring is the “glow ring”.  The glow ring pulses; its color can be altered to pulse different colors within different value ranges.

Here is a video of the gauge in action. A change in the displayed value results in an animation sequence that changes the bar gradually.  An animation sequence also causes the glow ring to pulse.  Both effects are obtained via the the Qt Animation Framework. 

The gauge is built up from layers.  The first layer is the empty “channel”, while the next layer adds the value bar.  Both layers are drawn by QPainter::drawPie.

The next layer is the pulse ring, which is an ellipse drawn by QPainter::drawEllipse.

The next to last layer is a black ellipse, within which the value of the gauge is displayed.

QVariantAnimation is used animate both the value bar and the pulse ring.

I hope you find this useful.  Constructive feedback and questions are always welcome.

Solved Problem with SVN in Qt Creator

My Qt Creator installation on Windows 10 was having trouble with managing Subversion revisions.  Creator was complaining it couldn’t find svnversion.exe, but other things had to be wrong, as it was unable to add/delete/rename SVN repo files properly.  I figured the problem may be that Creator is a 32-bit application, and was unable to use SVN DLLs.   I re-installed (TortoiseSVN), but since my OS is 64-bit, I had to install the 64-bit version.  Then I noticed this on the download page:

Context menu in file-open/save dialogs on x64 OS

On x64 versions of Windows 7 and 8, the TortoiseSVN context menu and overlays won’t show for 32-bit applications in their file-open/save dialogs until you install the 2017 C-runtime for x86. (select the vc_redist.x86.exe file for download).

Note: this only applies to 32-bit applications on x64 OS. The Windows explorer is not affected by this.

So, I install the vc_redist.x86.exe and everything now works.

Resolving a Problem with Qt Charts in Qt Creator (procedure missing)

I’ve been working a project that uses Qt Charts, which is of course a great library.  I created a custom widget that incorporates a QChartView.  I then decided to create a designer plugin for my new widget.  Unfortunately, after I installed in plugins/designer under Qt Creator’s bin directory, it failed to load, stating “The specified procedure could not be found.”  Given the fact that Creator can’t or won’t show you what procedure is missing, I had to do a little debugging.  I determined that the Qt Charts DLL wasn’t being found.

The solution was to copy the Qt5Charts*.dll files to the Qt Creator bin directory with Qt5Core, etc.  Since Qt Creator is compiled with Visual Studio C++ (in my case MSVC 2015 32-bit), make sure you are copying from the correct bin directory in your installed Qt hierarchy.

This was Qt Creator 4.5.0, Based on Qt 5.10.0 (MSVC 2015, 32 bit)

Introduction to Hierarchical Data Format (HDF)

Hierarchical Data Format (HDF) is a non-proprietary format designed to handle large sets of complex, multidimensional, heterogeneous data.  It is supported by the HDF Group, a non-profit organization dedicated to long-term development and maintenance of HDF. There are two versions of the format, HDF4 and HDF5.  HDF5 is a simplification of HDF4, with a better defined data model and a much simpler API. I have worked with both formats, and HDF5 is IMO the better choice, unless you have legacy files and code in HDF4.

HDF5 has a very liberal licensing policy; you may distribute it in binary or source form, as long as you acknowledge the HDF Group appropriately (licensing info).  This includes commercial uses.

HDF5 is supported by Matlab, Mathematica, and other commercial and non-commercial products.  It is a C library with bindings for C++, Fortran,  Java, Python, Julia, .Net, R, and others.  This makes it a good format for cross-platform/cross-language exchange/transmission of data. The distribution includes the library, an Java-based HDF viewer, command-line utilities, and source for a test suite.

Internally, HDF5 is very much like a file system structure, with group objects that can hold other groups or data sets.  You can refer to groups using file system like paths: /path/to/stuff.  It’s basically a Big Data/No SQL format.  Data is self-describing, so any application that wants to read an HDF5 file knows exactly what is in each data set.  It has a very flexible metadata/attribute system.  You can easily describe and read/write any data type that meets specific data needs in your environment, and allow anyone to understand that data type later. An HDF5 file is internally indexed by a BSP tree, so you can randomly access groups and data sets without having to read in the entire file first. HDF5 data sets can be laid out in contiguous or “chunked” form.  Chunking is necessary for compression and for creating data sets with extendible dimensions. In other words, you can continue to grow the dimensions of a data set within the file.

This was just a short introduction, but I hope you can see that HDF is a powerful way to store and exchange data, and check it out to see if it can help you with your data storage needs and issues.


A Simple Qt Diagram Layout Example

I have uploaded code for a simple Qt application that demonstrates how to make a simple layout using the library libavoid (written and maintained by Michael Wybrow, a member of MArVL: the Monash Adaptive Visualisation Lab at Monash University, Australia), which is part of the Adaptagram project.  The code can be found here on Github.  Libavoid provides fast connector routing around obstacles in a diagram. The application allows you to drag the boxes about the screen; the connecting lines are automatically routed by libavoid. The example was written on Windows 7, against Qt 5.7, using MinGW 5.3. The libavoid source is included in the repository.

Screen Shot 08-22-16 at 10.54 PM