Thanks musicamante!
This saved me reimplementing my Gtk plotter to Qt. But I had trouble running this with complains that:
QRectF/QRect(int, int, int, int): argument has unexpected type 'float'
After changing the QRectF/QRect lines to:
bar = QtCore.QRect(*[int(x), int(columnHeight - height), int(columnWidth), int(height)])
labelRect = QtCore.QRect(int(x), int(columnHeight), int(columnSpace), int(labelHeight))
The code worked perfectly.