Results 1 to 2 of 2

Thread: QwtLegend obscured by "as needed" horizontal scrollbar

  1. #1
    Join Date
    Jun 2008
    Location
    Boulder, Colorado, USA
    Posts
    70
    Thanks
    16
    Thanked 1 Time in 1 Post
    Qt products
    Qt5
    Platforms
    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.

    ScrollbarObscuresPlotLegend.jpg
    http://cadswes2.colorado.edu/~philw/...PlotLegend.png

    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
    Location
    Munich, Germany
    Posts
    3,199
    Thanked 847 Times in 796 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    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 
    Uwe

  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, 10:02
  2. Replies: 3
    Last Post: 16th March 2015, 07:31
  3. Replies: 4
    Last Post: 16th October 2009, 09:19
  4. Translation QFileDialog standart buttons ("Open"/"Save"/"Cancel")
    By victor.yacovlev in forum Qt Programming
    Replies: 4
    Last Post: 24th January 2008, 19:05
  5. How to make "west" tabs horizontal?
    By plumbum in forum Qt Programming
    Replies: 2
    Last Post: 7th June 2007, 10:32

Tags for this Thread

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.