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. - ... ?
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...
Qt Code:
item->setIdentifierWidth(5);To copy to clipboard, switch view to plain text mode
Last edited by Mint87; 30th January 2013 at 13:55.
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:
Qt Code:
legend->findChildren<QScrollArea>( "QwtLegendView" );To copy to clipboard, switch view to plain text mode
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
Bookmarks