Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 3

Qt-interest Archive, June 2007
Qt equivalent of GetDeviceCaps(hDC, LOGPIXELSX) ???


Message 1 in thread

Is there a Qt equivalent for finding the number of pixels per inch in 
the x and y dimensions for a display?
On Windows I use GetDeviceCaps(hDC, LOGPIXELSX)

Thanks in advance,
Mark

-- 
 [ signature omitted ] 

Message 2 in thread

Use any Window QWidget:

    screen_xperinch = mainw->logicalDpiX();
    screen_yperinch = mainw->logicalDpiY();



On 06-12-2007 12:26 PM, "Mark Thompson" wrote:

> Is there a Qt equivalent for finding the number of pixels per inch in
> the x and y dimensions for a display?
> On Windows I use GetDeviceCaps(hDC, LOGPIXELSX)
> 
> Thanks in advance,
> Mark

Keith Esau
Senior Software Engineer (dpSHEET)
PDF Solutions, Inc.
keith.esau@xxxxxxx
913-599-6537 (work/home)
913-515-2135 (mobile)
kaesau@xxxxxxxxxxxxx (home/personal)
  
===========================================================================
CONFIDENTIALITY NOTICE: This email contains information that may be
confidential and privileged. Unless you are the intended recipient (or
authorized to receive for the intended recipient), you are prohibited from
reviewing, using, copying, forwarding, keeping, or disclosing to anyone
other than PDF Solutions, Inc. this email or any information in the email
(including any attachment). If you have received this email in error,
please send a reply email only to the sender <keith.esau@xxxxxxx> (delete
the original message body from the reply), and please delete this message
from your system. My apologies for the inconvenience, and thank you in
advance for your cooperation.
===========================================================================


--
 [ signature omitted ] 

Message 3 in thread

> Use any Window QWidget:
>
>     screen_xperinch = mainw->logicalDpiX();
>     screen_yperinch = mainw->logicalDpiY();
>
>

You can use
QApplication::instance()->desktopWidget()->numScreens()
and
QApplication::instance()->desktopWidget()->screen(int screen)

To get QWidgets that "represent" each screen. You can get thier dpi's
individually.


 --Justin
>
> On 06-12-2007 12:26 PM, "Mark Thompson" wrote:
>
>> Is there a Qt equivalent for finding the number of pixels per inch in
>> the x and y dimensions for a display?
>> On Windows I use GetDeviceCaps(hDC, LOGPIXELSX)
>>
>> Thanks in advance,
>> Mark
>
> Keith Esau
> Senior Software Engineer (dpSHEET)
> PDF Solutions, Inc.
> keith.esau@xxxxxxx
> 913-599-6537 (work/home)
> 913-515-2135 (mobile)
> kaesau@xxxxxxxxxxxxx (home/personal)
>
> ===========================================================================
> CONFIDENTIALITY NOTICE: This email contains information that may be
> confidential and privileged. Unless you are the intended recipient (or
> authorized to receive for the intended recipient), you are prohibited from
> reviewing, using, copying, forwarding, keeping, or disclosing to anyone
> other than PDF Solutions, Inc. this email or any information in the email
> (including any attachment). If you have received this email in error,
> please send a reply email only to the sender <keith.esau@xxxxxxx> (delete
> the original message body from the reply), and please delete this message
> from your system. My apologies for the inconvenience, and thank you in
> advance for your cooperation.
> ===========================================================================
>
>
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with
> "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/
>


--
 [ signature omitted ]