Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2015-05

Qt doesn't return proper DC Device Size

6 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Giuliano Colla

While trying to obtain programmatically the snapshot of a window, I stumbled into a Qt bug.

It turned out that TQtDeviceContext.getDeviceSize always returns a size of 10x10 for any widget I tried.
It returns the proper size only for the full screen (i.e. if DC=0).

For sake of completeness, GTK2 returns the proper size.

Can it be fixed?

Giuliano

Giuliano Colla Project planning question: when it's 90% done, are we halfway or not yet?

Reply by email

zeljko
to Giuliano Colla
Giuliano Colla wrote 11 lines
While trying to obtain programmatically the snapshot of a window, I stumbled into a Qt bug. It turned out that TQtDeviceContext.getDeviceSize always returns a size of 10x10 for any widget I tried. It returns the proper size only for the full screen (i.e. if DC=0). For sake of completeness, GTK2 returns the proper size. Can it be fixed?

Of course. Pls. open an issue about it.

zeljko

Reply by email

zeljko
to Giuliano Colla: While trying to obtain programmatically the snapshot of a window, I stumbled into a Qt…
Giuliano Colla wrote 11 lines
While trying to obtain programmatically the snapshot of a window, I stumbled into a Qt bug. It turned out that TQtDeviceContext.getDeviceSize always returns a size of 10x10 for any widget I tried. It returns the proper size only for the full screen (i.e. if DC=0). For sake of completeness, GTK2 returns the proper size. Can it be fixed?

And attach example project please.

zeljko

Reply by email

vfclists .
to zeljko
zeljko wrote 21 lines
On 05/16/2015 02:15 PM, Giuliano Colla wrote: > > While trying to obtain programmatically the snapshot of a window, I > stumbled into a Qt bug. > > It turned out that TQtDeviceContext.getDeviceSize always returns a size > of 10x10 for any widget I tried. > It returns the proper size only for the full screen (i.e. if DC=0). > > For sake of completeness, GTK2 returns the proper size. > > Can it be fixed? > And attach example project please. zeljko

I just checked your fix from the Caret.Y function for getting the current line in a memo and it is working fine.

I will be learning Qt from following your patches. :)

Frank Church ======================= http://devblog.brahmancreations.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20150516/aa764cb1/attachment.html>

Reply by email

Giuliano Colla
to zeljko: And attach example project please. zeljko

Il 16/05/2015 14:27, zeljko ha scritto:

Show quoted text 15 lines
On 05/16/2015 02:15 PM, Giuliano Colla wrote: > > While trying to obtain programmatically the snapshot of a window, I > stumbled into a Qt bug. > > It turned out that TQtDeviceContext.getDeviceSize always returns a size > of 10x10 for any widget I tried. > It returns the proper size only for the full screen (i.e. if DC=0). > > For sake of completeness, GTK2 returns the proper size. > > Can it be fixed? And attach example project please.

Done:

http://bugs.freepascal.org/view.php?id=28106

Thanks,

Giuliano

Giuliano Colla Project planning question: when it's 90% done, are we halfway or not yet?

Reply by email