[Qt-interest] Is there any mapping mode support in Qt Graphics Framework to map logical co-ordinates to physical co-ordinates
AK
qtbond007 at gmail.com
Tue Jan 11 07:30:52 CET 2011
Say my screen has a resolution of 92 DPI. I want to have 1000 logical points
per inch. So that even at 10 times zoom User can manipulate each logical
point.
How can I achieve this in Qt?
In MFC its pretty straightforward. One has to select appropriate mapping
mode for device context. For above case one has to select MM_HIENGLISH.
On Mon, Jan 10, 2011 at 9:09 PM, Mihail Naydenov <mlists at ymail.com> wrote:
> I think not in a straightforward way. You can access the screen in pixels,
> then
> you can try to query the QPaintDevice::physical/logicalDpi (QWidget is a
> paintDevice, so try to query the graphics scene view's viewport() widget
> for
> these)
> and compute real word coords.
>
> MihailNaydenov
>
> PS I just noticed you want to *control* the dpi... I dont think it is
> possible,
> reading the docs for QPaintDevice the metrics are read only it seems...
>
> >
> >From: AK <qtbond007 at gmail.com>
> >To: qt-interest at qt.nokia.com
> >Sent: Mon, January 10, 2011 9:52:53 AM
> >Subject: [Qt-interest] Is there any mapping mode support in Qt Graphics
> >Framework to map logical co-ordinates to physical co-ordinates
> >
> >Hello,
> >
> >
> >I wish to control number of logical coordinates per physical inch. Is
> there any
>
> >direct support in Qt Graphics framework for this?
> >
> >
> >AK
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110111/be44fd42/attachment.html
More information about the Qt-interest-old
mailing list