QTextEdit QTextDocument PageSize/PageCount
Hi,
Im trying to add a label on my statusbar witch should contain the current pagenumber and the pagecount.
For this I need to setup the pagesize for the document first...
now I was wondering if it is somehow possible to use the QPrinter::PaperSize?
But i dont know how to get to the height/width constants... since only an enum int is returned (correct me if im wrong)
Any tips?
Thanks
Re: QTextEdit QTextDocument PageSize/PageCount
You can use line numbers for page size. You only can decide the height of the page. BTW, whats the application?
Re: QTextEdit QTextDocument PageSize/PageCount
Thanks for the reply....
Quote:
You can use line numbers for page size
Well i would still need to know how many lines fit into a Page... I could print a page out and see how many fit in a page and then set this value as default...
Might be the easiest way since A4 paper is the standard... :p
Quote:
BTW, whats the application?
Im programming a custom Code Editor with syntaxhiglighting.
Greets
Re: QTextEdit QTextDocument PageSize/PageCount
You can use this for windows.
Code:
Returns the page size used by the printer under Windows.
Re: QTextEdit QTextDocument PageSize/PageCount
Ok... Im looking into this, but i dont see the conection between the int retunrned and the page number...
and calling the function directly doesent work....