[PySide] QLabel crops pixmap
Frank Rueter | OHUfx
frank at ohufx.com
Fri Mar 11 07:46:59 CET 2016
Hi,
I have been using something like the below code on osx without trouble
(simple QLabel with setPixmap to show an svg file from my resource module).
When running the same code on windows, the label crops the image on the
right, and I cannot figure out how to make it behave the same as under
osx (adjust to the pixmap's size). Even brudte forcing it's width to
somethign much larger than the pixmap will still result in a cropped
display.
Does anybody know what might be going on?
Cheers, frank
import common
from PySide.QtGui import * # for testing only
from PySide.QtCore import * # for testing only
class TestImageLabel(QLabel):
def __init__(self, parent=None):
super(TestImageLabel, self).__init__(parent)
self.pm = common.IconCache.getPixmap('nuBridge_logo')
self.setPixmap(self.pm)
def showEvent(self, e):
super(TestImageLabel, self).showEvent(e)
print self.pm.width()
print self.width()
w = TestImageLabel()
w.show()
--
ohufxLogo 50x50 <http://www.ohufx.com> *vfx compositing
<http://ohufx.com/index.php/vfx-compositing> | *workflow customisation
and consulting <http://ohufx.com/index.php/vfx-customising>* *
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/pyside/attachments/20160311/e192b56d/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ohufxLogo_50x50.png
Type: image/png
Size: 2666 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/pyside/attachments/20160311/e192b56d/attachment.png>
More information about the PySide
mailing list