Results 1 to 2 of 2

Thread: QwtLegend obscured by "as needed" horizontal scrollbar

  1. #1
    Join Date
    Jun 2008
    Boulder, Colorado, USA
    Thanked 1 Time in 1 Post
    Qt products
    Unix/X11 Windows

    Default QwtLegend obscured by "as needed" horizontal scrollbar

    Is there a way of preventing the optionally needed horizontal scrollbar from obscuring items shown in the legend (QwtLegend)?

    The first of this sequence of three images illustrates the problem. The plot dialog needs to be sufficiently wide for the content of the QwtLegend to be seen.


    Any ideas would be appreciated. Is there way of getting notifications from an "as needed" scrollbar being shown and hidden (without subclassing), e.g. to conditionally impose a minimum height on the QwtLegend widget? OR, might there there a higher-level solution?

    We're using Qwt 6.1.3 with Qt 5.5.1 on Windows.

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

    Default Re: QwtLegend obscured by "as needed" horizontal scrollbar

    Qt Code:
    1. QScrollArea *scrollArea = legend->findChild<QScrollArea *>();
    2. scrollArea->setHorizontalScrollBarPolicy( Qt::ScrollBarAlwaysOff );
    To copy to clipboard, switch view to plain text mode 

  3. The following user says thank you to Uwe for this useful post:

    philw (2nd December 2016)

Similar Threads

  1. Replies: 1
    Last Post: 20th November 2015, 11:02
  2. Replies: 3
    Last Post: 16th March 2015, 08:31
  3. Replies: 4
    Last Post: 16th October 2009, 10:19
  4. Translation QFileDialog standart buttons ("Open"/"Save"/"Cancel")
    By victor.yacovlev in forum Qt Programming
    Replies: 4
    Last Post: 24th January 2008, 20:05
  5. How to make "west" tabs horizontal?
    By plumbum in forum Qt Programming
    Replies: 2
    Last Post: 7th June 2007, 11:32

Tags for this Thread


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.