Results 1 to 3 of 3

Thread: Initialize my container of Qwt plots to a certain size?

  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 Initialize my container of Qwt plots to a certain size?

    I'm trying to generate some 1600x1000 plots which are multi-panel Qwt plots, similar to the plot matrix example. I am using a QFrame as my container object which has a QGridLayout for its layout. In my GUI, I put the QFrame into a QScrollArea so the user can scroll the plot if it is too big, and everything works pretty well.

    Now, I want to export the entirety of the QFrame to a 1600x1000 plot without scaling so I don't lose resolution. In other words, I want to render it to this size, rather than rescale.

    What is the best way to do this? I feel like I have tried a variety of setGeometry and setMinimumSize and nothing seems to change. Even trying a setGeometry on the simple examples like Friedberg I can't get it to change size.

    Can anyone tell me what I am missing?

    Thanks,
    Joey

  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: Initialize my container of Qwt plots to a certain size?

    For the text above I have no clue, what your want to achieve.

    Uwe

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

    Default Re: Initialize my container of Qwt plots to a certain size?

    Fair enough. Let me try again.

    I have a QScrollArea container which contains a QFrame which is similar to the plotmatrix.h in playground/plotmatrix. Each element of my plot matrix is an independent Qwt plot. By putting the whole plot matrix into a QScrollArea, I can create a really large plot which the user can scroll around to see letting Qwt determine the best size for each of the plots. However, now, I would like to constrain the QScrollArea to a particular size. I find if I constrain my QFrame using setFixedSize, it works pretty well! Qt (or Qwt?) will size things down fairly well; however, if the plot is really too big, it will clip the bottom or size plots funny.

    I guess my real question is, how do I best constrain the size of the qwt plot to make a better layout? Or am I doing this all wrong? I admit I don't understand the layout mechanism that well and the default sizing seems to work most of the time, except when it does not! I was hoping others had ventured into this area!

    Thanks,
    Joey

Similar Threads

  1. Could not initialize OLE weirdness
    By stevey in forum Qt Programming
    Replies: 1
    Last Post: 2nd August 2013, 22:20
  2. Replies: 3
    Last Post: 8th April 2013, 08:06
  3. Replies: 7
    Last Post: 31st May 2011, 00:10
  4. Replies: 0
    Last Post: 2nd October 2009, 18:57
  5. Quick ? about qSort(Container & container)
    By JimDaniel in forum Qt Programming
    Replies: 2
    Last Post: 15th December 2007, 12:20

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.