Results 1 to 4 of 4

Thread: Layout inside QwtLegend

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

    Default Layout inside QwtLegend

    Hi,

    Can U tell me how to do some layout in QwtLegend when I am inserting her like ExternalLegend?

    I have tableview with two columns: 1st - QwtLegend, 2d - QwtPlot...
    So when I instert QwtLegend to 1st column, all name of curves in QwtLegend are layout vertically but I need to layout them horizontally...

    I've tried to do Widget that include QwtLegend and Horizontal layout but this didn't help...

    So what I need to do horizontally layout, not vertically?

    carhun

  2. #2
    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: Layout inside QwtLegend

    Usually using QwtLegend::setMaxColumns is the key for individual layouts.

    Uwe

    Note, that the API for how to connect a legend to a plot has significantly changed in SVN trunk with much more options for implementing individual legends. F.e the stockchart example shows a completely different legend.

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

    Default Re: Layout inside QwtLegend

    Hi, Uwe.

    Sorry, but I don't see this example in qwt.6.0.1, and I don't have access to QwtLegend::setMaxColumns...

    Where I can see this example?


    I did this in this way:
    QwtDynGridLayout *t1 = qobject_cast<QwtDynGridLayout *>(leg->contentsWidget()->layout());
    t1->setMaxCols(1);

    Thanks.

    But I also want to see example that U told about... Can U show me?
    Last edited by carhun; 6th August 2012 at 07:23.

  4. #4
    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: Layout inside QwtLegend

    Quote Originally Posted by carhun View Post
    But I also want to see example that U told about... Can U show me?
    It's in SVN trunk.

    Uwe

Similar Threads

  1. Resize widget to layout inside it.
    By mrc_pl in forum Newbie
    Replies: 2
    Last Post: 14th January 2012, 20:22
  2. Replies: 0
    Last Post: 22nd July 2011, 11:31
  3. How can I set a layout to a dock inside Qt Designer?
    By ricardo in forum Qt Programming
    Replies: 4
    Last Post: 1st May 2009, 10:17
  4. Resizing a QTreeWidget inside a layout
    By bruccutler in forum Qt Programming
    Replies: 11
    Last Post: 27th March 2007, 15:35
  5. How do I move a widget inside a grid Layout
    By barnabyr in forum Newbie
    Replies: 1
    Last Post: 8th May 2006, 23:23

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.