Subject: CGAL users discussion list
List archive
- From: Mahmood Naderan <>
- To:
- Subject: Re: [cgal-discuss] Question about QPixmap and Qt_widget
- Date: Mon, 12 May 2008 21:27:55 -0700 (PDT)
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type:Message-ID; b=xr5UzjdEQxegXQptYTioG9XUfE6/1IJbL3hbvhFg6HB6CmE6U3ggzojsZMFeYSRp9J5zwCeUmotd1ZMyrzCiahR8PH9ugJyqBo/OGs2iM/cY1X4FWxN3HzFBV+96wf3r7183wHV4oysIwkoIaEltVi2s+6vozzGhPsexZ9Corbo=;
>Indeed, there is no such function 'render' in Qt3's QWidget.
Yes I also find that this function is in new versions (>4).
For capturing the output screen I found this on QT mailing list and it works:
QPixmap::grabWindow(widget->winId()).save("filename", "PNG");
-------------------
Mahmood Naderan
Mahmood Naderan
----- Original Message ----
From: Laurent Rineau <>
To:
Sent: Monday, May 12, 2008 5:38:24 PM
Subject: Re: [cgal-discuss] Question about QPixmap and Qt_widget
On Monday 12 May 2008 12:53:34 Mahmood Naderan wrote:
> Hi,
> I want to save the QT output window in a known picture format. To do this I
> found these statements: QPixmap pixmap(widget->size());
> widget->render(&pixmap);
> pixmap.save("myWidget.png");
> The error of using this is:error C2039: 'render' : is not a member of
> 'CGAL::Qt_widget' error C2661: 'QPixmap::save' : no overloaded function
> takes 1 arguments
Indeed, there is no such function 'render' in Qt3's QWidget.
Anyway, CGAL::Qt_widget has a documented function get_pixmap(), that gives you
a pixmap of the widget's viewport. See the documentation:
http://www.cgal.org/Manual/3.3/doc_html/cgal_manual/Qt_widget_ref/Class_Qt_widget.html
--
Laurent Rineau
INRIA - Sophia Antipolis
BP 93, 2004 Route des Lucioles
06902 Sophia Antipolis Cedex FRANCE
Tel: +33 4 92 38 78 62 (Fax: +33.4.97.15.53.95)
--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://lists-sop.inria.fr/wws/info/cgal-discuss
From: Laurent Rineau <>
To:
Sent: Monday, May 12, 2008 5:38:24 PM
Subject: Re: [cgal-discuss] Question about QPixmap and Qt_widget
On Monday 12 May 2008 12:53:34 Mahmood Naderan wrote:
> Hi,
> I want to save the QT output window in a known picture format. To do this I
> found these statements: QPixmap pixmap(widget->size());
> widget->render(&pixmap);
> pixmap.save("myWidget.png");
> The error of using this is:error C2039: 'render' : is not a member of
> 'CGAL::Qt_widget' error C2661: 'QPixmap::save' : no overloaded function
> takes 1 arguments
Indeed, there is no such function 'render' in Qt3's QWidget.
Anyway, CGAL::Qt_widget has a documented function get_pixmap(), that gives you
a pixmap of the widget's viewport. See the documentation:
http://www.cgal.org/Manual/3.3/doc_html/cgal_manual/Qt_widget_ref/Class_Qt_widget.html
--
Laurent Rineau
INRIA - Sophia Antipolis
BP 93, 2004 Route des Lucioles
06902 Sophia Antipolis Cedex FRANCE
Tel: +33 4 92 38 78 62 (Fax: +33.4.97.15.53.95)
--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://lists-sop.inria.fr/wws/info/cgal-discuss
Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.
- Re: [cgal-discuss] Question about QPixmap and Qt_widget, Mahmood Naderan, 05/13/2008
- <Possible follow-up(s)>
- Re: [cgal-discuss] Question about QPixmap and Qt_widget, Mahmood Naderan, 05/13/2008
Archive powered by MHonArc 2.6.16.