Results 1 to 2 of 2

Thread: Any way to "render" an off-screen plot with lots of data to speed up loading?

  1. #1
    Join Date
    Dec 2011
    Posts
    53
    Thanks
    12
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Any way to "render" an off-screen plot with lots of data to speed up loading?

    Per the title -- I have a QStackedWidget controlled by a QComboBox. Each page in the stacked widget contains a plot, some more populated than others.

    When switching pages via the combo box, the UI freezes for a couple of seconds as it tries to paint the new plot; this is specially bad on complex plots.

    After switching plots once and switching pages back, it's fast.

    I'm wondering how folks handle this to avoid locking-up the UI? Can the non-visible plots be forced to "paint" by some mechanism? Or is there another way?

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

    Default Re: Any way to "render" an off-screen plot with lots of data to speed up loading?

    The content of the canvas is rendered to a pixmap, before it gets painted to the widget. So as long as size and content of the plot canvas does not change you won't have any expensive operation regardless of the heaviness of your plot. Painting the canvas is done by QwtPlotCanvas::paintEvent.

    Uwe

Similar Threads

  1. Replies: 1
    Last Post: 3rd December 2013, 02:19
  2. "Render" Qt dialog window from ".ui" file
    By BitEater in forum Qt Programming
    Replies: 1
    Last Post: 8th July 2011, 14:40
  3. Replies: 1
    Last Post: 7th April 2010, 21:46
  4. Replies: 3
    Last Post: 25th August 2009, 13:03
  5. Translation QFileDialog standart buttons ("Open"/"Save"/"Cancel")
    By victor.yacovlev in forum Qt Programming
    Replies: 4
    Last Post: 24th January 2008, 19:05

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.