PDA

View Full Version : page.drawText alignment



tsrplatelayer
7th March 2015, 13:45
In a QScript module this works


page. drawText ( ps. x + fr.col_offset, y, fr.col_width, h, CReportPage.AlignLeft | CReportPage.AlignVCenter, fr.txttoprint );

However I need to be able to build the alignment requirement sperately, much simplified


fr.valign = CReportPage.AlignVCenter;
fr.halign = CReportPage.Alignleft;
page. drawText ( ps. x + fr.col_offset, y, fr.col_width, h, fr.valign | fr.halign, fr.txttoprint );

and this doesn't work.:confused:

Please can someone advise how I can get it to work.

Many Thanks

Allan

anda_skoa
8th March 2015, 09:50
Have you checked if the two values are different?

E.g. make a qDebug() log output in the C++ function that implements drawText()?

Cheerss
_

tsrplatelayer
8th March 2015, 14:24
Thanks for that offering. I dont have access to the QT project source - just the QScript module, debugging is proving to be a pain.

Allam

Added after 38 minutes:

I fixed it.


page. drawText ( ps. x + fr.col_offset, y, fr.col_width, h, parseInt(fr.valign | fr.halign), fr.txttoprint );

did the job