Results 1 to 3 of 3

Thread: QwtLegend from trunk qwt

  1. #1
    Join Date
    Jun 2012
    Posts
    33
    Thanks
    6

    Default QwtLegend from trunk qwt

    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. - ... ?

  2. #2
    Join Date
    Nov 2011
    Posts
    14
    Thanks
    2
    Thanked 2 Times in 2 Posts
    Qt products
    Qt3 Qt4 Qt Jambi
    Platforms
    MacOS X Windows

    Default Re: QwtLegend from trunk qwt

    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:
    1. item->setIdentifierWidth(5);
    To copy to clipboard, switch view to plain text mode 
    Last edited by Mint87; 30th January 2013 at 13:55.

  3. #3
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,312
    Thanked 879 Times in 827 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QwtLegend from trunk qwt

    Quote Originally Posted by carhun View Post
    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:

    Qt Code:
    1. 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

Similar Threads

  1. Qwt 6.1.0 trunk and QwtLegend
    By carhun in forum Qwt
    Replies: 0
    Last Post: 22nd August 2012, 09:13
  2. Legend item with SVN trunk
    By bigjoeystud in forum Qwt
    Replies: 1
    Last Post: 7th August 2012, 19:33
  3. Moving from Qwt 5.2 to 6.0 (trunk)
    By bigjoeystud in forum Qwt
    Replies: 18
    Last Post: 21st May 2010, 19:17
  4. qgl_use_font error during compilation of QT git trunk
    By manuels in forum Installation and Deployment
    Replies: 0
    Last Post: 6th March 2010, 14:05
  5. Replies: 2
    Last Post: 15th February 2010, 15:07

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.