PDA

View Full Version : QwtLegend from trunk qwt



carhun
19th September 2012, 07:28
Hello!

How can I remove horizontal scroll bar for QwtLegend and instead of horizontall scroll bar if text does not fit that cut off text or add at the end of text that is fit f.e. - ... ?

Mint87
30th January 2013, 13:49
Working on the same problem now...So far I just made the width of the QwtLegendItem *item smaller so it fits, but thereshoud be a better solution...


item->setIdentifierWidth(5);

Uwe
30th January 2013, 21:12
How can I remove horizontal scroll bar for QwtLegend ...
I'm not sure what happens if you simply delete the scrollbar ( there are getters ) - try it.

Otherwise you need to get a pointer to the internal QScrollArea and modify its scrollbar policies. It should be the parent of the contents widgets - or use:


legend->findChildren<QScrollArea>( "QwtLegendView" );

You don't need to use the object name, but it should be more or less stable as it is used for the stylesheets.

When you have problems understanding the widget tree look in the code.

Uwe