[PyQt] Problem with centering point on QScrollArea

Shriramana Sharma samjnaa at gmail.com
Wed Jun 4 04:40:57 BST 2014


Hello. I am using PyQt 4.10.4 + Py 3.4.0 + Qt 4.8.5 on Kubuntu Trusty 64 bit.

I have attached a minimal test case. (You can find the same with
attached map for a while at
https://sites.google.com/site/jamadagni/files/temp/maptest.zip.)

I have tried to make the MapScrollArea center to the current map
location whenever it is resized or the current map location changes.
However I observe that initially when the app loads up, the current
location is slightly off-center. If I slightly adjust the
latitude/longitude, then it gets correctly centered.

I am not sure why exactly the initial position is off-center or what I
can do to fix it. I mused whether the width of the scrollbars would be
involved but I am not sure what to do to confirm it and fix it.

Any help is appreciated. Thanks!

-- 
Shriramana Sharma ஶ்ரீரமணஶர்மா श्रीरमणशर्मा
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mapwidget.py
Type: text/x-python
Size: 5060 bytes
Desc: not available
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20140604/2be443f3/attachment.py>


More information about the PyQt mailing list