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. - ... ?
Printable View
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. - ... ?
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...
Code:
item->setIdentifierWidth(5);
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:
Code:
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