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>* *

_______________________________________________
PySide mailing list
PySide@qt-project.org
http://lists.qt-project.org/mailman/listinfo/pyside

Reply via email to