Printer in Gtk ?
- From: Joerg Anders <j anders informatik tu-chemnitz de>
- To: gtk-list gnome org
- Subject: Printer in Gtk ?
- Date: Thu, 23 Dec 2004 09:34:12 +0100 (MET)
Hi all!
I'm about to decide between Qt or Gtk for my new project. One
important issue is printing. With Qt you can paint something
with a painter:
For exammple the function:
void MyWidget::draw(QPainter *p) {
p->begin(this);
p->drawArc(4, 4, 100, 100, 0, 16*360);
p->end();
}
paints a circle on widget surface if you call it such a way:
QPainter *p = new QPainter(this);
draw(p);
If you want to print the widget content you call it such a way:
QPrinter *pr = new QPrinter();
pr->setup(this);
QPainter *p = new QPainter(pr);
draw(p);
This way a real WhatYouSeeIsWhatYouGet - editor is possible. I'd decide
for Gtk if there were a similar way. But I didn't find any pointer
neither in documentation nor in the tutorials nor in FAQs.
Any suggestions ?
--
J.Anders, Chemnitz, GERMANY (ja informatik tu-chemnitz de)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]