When calling QWidget->render() (or the like), is there a way to get it to 
render at a different size? I have a widget that I am trying to capture to a 
png file, but I let the user decide what dimensions they want it to be saved 
at. I can easily make a QPixmap of desired size, but when I call render() on my 
widget, it just renders into a portion of the pixmap (if the pixmap is larger 
than the widget) or cuts off a portion (if the pixmap is smaller). Scaling the 
pixmap after rendering isn’t a good option, since aside from the loss of 
quality, it would scale *everything* in the pixmap, whereas changing the size 
of the QWidget actually results in some items moving and other scaling (much 
more complex than just make everything twice as big. Fonts, for example, should 
remain the same size).

I can resize the widget (by calling setFixedSize()) prior to calling render, 
which works, but that results in a visual glitch. Is there some better way to 
render the widget at a specific size? 
---
Israel Brewster
Software Engineer
Alaska Volcano Observatory 
Geophysical Institute - UAF 
2156 Koyukuk Drive 
Fairbanks AK 99775-7320
Work: 907-474-5172
cell:  907-328-9145

_______________________________________________
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest

Reply via email to