Results 1 to 4 of 4

Thread: QwtLegend size

  1. #1
    Join Date
    Aug 2007
    Posts
    275
    Thanks
    28
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default QwtLegend size

    I have an array of plots ,arranged vertically , with(QwtLegend) legend on the right on each plot, I synced the xBottom scale on all the plots, now I come across some problem when i have many items in one of my legend, the legend added the scroll bar which make sense , but then this in effect will mis allign my xBottom scale.

    I am looking for some suggestion on how can i overcome this issue that i have. Uwe can you give me some pointers on where i can control this behaviour..

    baray98

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

    Default Re: QwtLegend size

    Quote Originally Posted by baray98 View Post
    I am looking for some suggestion on how can i overcome this issue that i have. Uwe can you give me some pointers on where i can control this behaviour..
    QwtLegend uses a QScrollArea internally. There is no getter for it, but you could do a dynamic_cast for legend->contentWidget()->parentWidget() or legend->horizontalScrollBar()->parentWidget().

    Uwe

  3. #3
    Join Date
    Aug 2007
    Posts
    275
    Thanks
    28
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QwtLegend size

    I took a workaround cause i am lazy by nature. here's what i did . I declare my legends as external then added my plots in a QGridLayout and put the plot and its legend side by side. But then i have to clean up my legend myself but i have a good spot for it . Thanks uwe for your never ending reply to our problems.

    baray98

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

    Default Re: QwtLegend size

    Note, that external legends are not printed by QwtPlot:rint(). If you need to export/print your plot with the legend you will have some extra work.

    Uwe

Similar Threads

  1. QwtLegend size
    By baray98 in forum Qwt
    Replies: 0
    Last Post: 10th May 2010, 06:26
  2. Adding tooltip for each QwtLegendİtem
    By umituzun84 in forum Qwt
    Replies: 1
    Last Post: 25th March 2010, 08:24
  3. Set Title for QWTLegend...
    By umulingu in forum Qwt
    Replies: 3
    Last Post: 23rd March 2010, 10:28
  4. QwtLegend Position changing problem?
    By umituzun84 in forum Qwt
    Replies: 1
    Last Post: 19th March 2010, 14:25
  5. Replies: 1
    Last Post: 23rd May 2008, 09:24

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.