Hi,
I just recently started looking into QWT.
Is it possible to create a widget that solely contains of a colorbar? So just the colormap, with a range, possibly ticks, labels and a title, and no raster/canvas?
Hi,
I just recently started looking into QWT.
Is it possible to create a widget that solely contains of a colorbar? So just the colormap, with a range, possibly ticks, labels and a title, and no raster/canvas?
This is a QwtScaleWidget.
Uwe
yes, I figured that much, but I'm not sure how to paint it using a QPainter as the draw function is protected and even subclassing it and making the draw function public results in the title or a colorbar being drawn, but not both.
However I guess there is a better way to draw it using a QPainter object. Any example code in this regard is highly appreciated
QwtScaleWidget is a widget - you don't need a QPainter to use it.
Look at the spectrogram example how to use it - there is no difference between the scale widget of a plot widget or a standalone one.
Uwe
Bookmarks