I have uploaded a modest collection of widgets that I have found useful to GitHub at https://github.com/MarkVTech/MarkVWidgetCollection. 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!
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 https://github.com/MarkVTech/CircularGauge
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.
Hereis 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.
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.