Re: Printing a file

2006-03-03 Thread Florian Diesch
Fabian Steiner <[EMAIL PROTECTED]> wrote: > I am currently working on an application where the user is able to > create new worksheets and to delete existing ones. All of these > worksheets have the same structure (--> template?), only some values > should be changed. A minimal example would be

Re: Printing a file

2006-03-03 Thread David Boddie
Fabian Steiner wrote: > David Boddie wrote: > > In Qt 4, the demos/textedit demo does this with a lot less code. > > > > Or are you think of something else? > > Thank you very much for this hint! Thanks to this example I was able to > print out my first pages :) That's good to hear. :-) > But so

Re: Printing a file

2006-03-02 Thread Fabian Steiner
David Boddie wrote: > Sorry about that. I must have just skipped over the setup() call in > your code. If you're creating highly customized content then I think > you'll always need to think about getting the pages to the printer in > the right order. > > For rich text documents, there's code that

Re: Printing a file

2006-03-02 Thread David Boddie
Sorry about that. I must have just skipped over the setup() call in your code. If you're creating highly customized content then I think you'll always need to think about getting the pages to the printer in the right order. For rich text documents, there's code that does this in the Qt 3 text draw

Re: Printing a file

2006-03-02 Thread Jeremy Sanders
David Boddie wrote: > That's where QPrintDialog comes in: > > http://doc.trolltech.com/4.1/qprintdialog.html > > It's also secretly available in Qt 3 via the QPrinter.setup() method: > > printer = QPrinter() > printer.setup() > # Now, paint onto the printer as usual. No - that was in m

Re: Printing a file

2006-03-01 Thread David Boddie
Fabian Steiner wrote: > This is what I have so far: > > app = QApplication(sys.argv) > printer = QPrinter(QPrinter.PrinterResolution) > if printer.setup(): > printer.setPageSize(printer.A4) > painter = QPainter(printer) > metrics = QPaintDeviceMetrics(painter.device()) > margin

Re: Printing a file

2006-03-01 Thread Fabian Steiner
Hi! Thank you so far, but now I got stuck again :-/ Jeremy Sanders wrote: > QPrinter is easy to use. You just draw to the page the same way as you talk > to the screen with a QPainter. > > prnt = qt.QPrinter() > # you can also vary options like colour, doc name, dpi here > > # display dialog b

Re: Printing a file

2006-02-28 Thread David Boddie
Jeremy Sanders wrote: > Fabian Steiner wrote: > > > Unfortunately I don't know how to realize this, since also some images > > and different boxes should be printed out. As the whole application is > > based on QT, QPrinter might be used, but I couldn't find any examples > > how to use it. [...]

Re: Printing a file

2006-02-28 Thread Jeremy Sanders
Fabian Steiner wrote: > Unfortunately I don't know how to realize this, since also some images > and different boxes should be printed out. As the whole application is > based on QT, QPrinter might be used, but I couldn't find any examples > how to use it. QPrinter is easy to use. You just draw t

Printing a file

2006-02-28 Thread Fabian Steiner
Hello! I am currently working on an application where the user is able to create new worksheets and to delete existing ones. All of these worksheets have the same structure (--> template?), only some values should be changed. A minimal example would be something like this: Name: ... Ro