Results 1 to 2 of 2

Thread: Arranging Qwt plots of unequal sizes

  1. #1
    Join Date
    Sep 2007
    Posts
    61
    Thanks
    5
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Arranging Qwt plots of unequal sizes

    I would like to arrange multiple QwtPlots onto a layout, but I don't necessarily want them of equal sizes. For instance, I would like a "main" QwtPlot which occupies 60% of the layout and the two below it to be 20% each.

    I'm guessing a custom layout, but there aren't a whole lot of examples for this, even in plain Qt.

    Ideally, the number of labels/ticks would reduce on the smaller plots to accommodate their reduced size. Has anyone done something similar and would be willing to share code? If not, what's the best way to accomplish this?

    Thanks,
    Joey

  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: Arranging Qwt plots of unequal sizes

    Don't use a QLayout - instead overload the resizeEvent of the widget containing your plots and lay out the plots manually ( using QWidget::setGeometry() ).

    Uwe

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

    bigjoeystud (30th September 2013)

Similar Threads

  1. Replies: 3
    Last Post: 8th April 2013, 07:06
  2. Layout without arranging or positioning
    By alizadeh91 in forum Qt Programming
    Replies: 3
    Last Post: 29th February 2012, 10:07
  3. QSplitter and re-arranging widgets within
    By poppenspeler in forum Newbie
    Replies: 1
    Last Post: 19th October 2011, 21:48
  4. arranging objects in splitter widget
    By bigbill in forum Newbie
    Replies: 2
    Last Post: 13th December 2010, 12:33
  5. Arranging the Items in Qtopia
    By sar_van81 in forum Qt for Embedded and Mobile
    Replies: 3
    Last Post: 10th December 2007, 08:52

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.