From frank at ohufx.com Wed Mar 2 07:20:09 2016 From: frank at ohufx.com (Frank Rueter | OHUfx) Date: Wed, 2 Mar 2016 19:20:09 +1300 Subject: [PySide] trouble with special characters in widget.setToolTip() Message-ID: <56D68619.7010008@ohufx.com> Hi guys, I've been reading up on unicode and character encoding a bit today and just when I thought I had a vague idea how it all works I ran into this problem: I am retrieving unicode from a website, which I need to format a little, then display as a widget's tooltip. When I print out my formatted string I get the special characters I expect, but when I use the same string as a tooltip, it displays a "å" character instead. Here is a screen shot of what I'm seeing: And below is a simple test that shows my problem. Can somebody please explain to me what is going on here and how I should be handle this properly? Cheers, frank import sys from PySide import QtGui quotationMark = u'\u201c' myText = 'special charactes cause headaches: {}'.format(quotationMark.encode('utf-8')) print myText # this prints the crrect special character (quotation mark) app = QtGui.QApplication([]) w = QtGui.QWidget() w.setToolTip(myText) # this just ends up displaying a "å" character w.show() w.raise_() sys.exit(app.exec_()) -- ohufxLogo 50x50 *vfx compositing | *workflow customisation and consulting * * -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Screen Shot 2016-03-02 at 7.19.05 pm.png Type: image/png Size: 21640 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ohufxLogo_50x50.png Type: image/png Size: 2666 bytes Desc: not available URL: From sebastian at risefx.com Wed Mar 2 10:59:38 2016 From: sebastian at risefx.com (Sebastian Elsner | RISE) Date: Wed, 2 Mar 2016 10:59:38 +0100 Subject: [PySide] trouble with special characters in widget.setToolTip() In-Reply-To: <56D68619.7010008@ohufx.com> References: <56D68619.7010008@ohufx.com> Message-ID: <56D6B98A.3060702@risefx.com> Unicode is tricky, it bites me every time. This works: ######################## # -*- coding: utf-8 -*- import sys from PyQt4 import QtGui quotationMark = u'\u201c' myText = u'special charactes cause headaches: {0}'.format(quotationMark) print myText # this prints the crrect special character (quotation mark) app = QtGui.QApplication([]) w = QtGui.QWidget() w.setToolTip(myText) # this just ends up displaying a "å" character w.show() w.raise_() sys.exit(app.exec_()) ######################### Please note, the .py file actually has to be saved/encoded as utf-8. You need to do this via your editor's save/convert function. On 03/02/2016 07:20 AM, Frank Rueter | OHUfx wrote: > Hi guys, > > I've been reading up on unicode and character encoding a bit today and > just when I thought I had a vague idea how it all works I ran into > this problem: > > I am retrieving unicode from a website, which I need to format a > little, then display as a widget's tooltip. > When I print out my formatted string I get the special characters I > expect, but when I use the same string as a tooltip, it displays a "å" > character instead. > Here is a screen shot of what I'm seeing: > > > And below is a simple test that shows my problem. > Can somebody please explain to me what is going on here and how I > should be handle this properly? > > Cheers, > frank > > import sys > from PySide import QtGui > > quotationMark = u'\u201c' > myText = 'special charactes cause headaches: > {}'.format(quotationMark.encode('utf-8')) > print myText # this prints the crrect special character (quotation > mark) > > app = QtGui.QApplication([]) > w = QtGui.QWidget() > w.setToolTip(myText) # this just ends up displaying a "å" character > w.show() > w.raise_() > sys.exit(app.exec_()) > > > -- > ohufxLogo 50x50 *vfx compositing > | *workflow customisation > and consulting * * > > > > _______________________________________________ > PySide mailing list > PySide at qt-project.org > http://lists.qt-project.org/mailman/listinfo/pyside -- _*check out pointcloud9.com*_ **Sebastian Elsner - Pipeline Technical Director - RISE* t: +49 30 20180300 _sebastian at risefx.com _ f: +49 30 61651074 _www.risefx.com_ * *RISE FX GmbH* *Schlesische Straße 28, 10997 Berlin An der Schanz 1A, 50735 Köln Büchsenstraße 20, 70174 Stuttgart Gumpendorferstraße 55, 1060 Wien Geschaeftsfuehrer: Sven Pannicke, Robert Pinnow Handelsregister Berlin HRB 106667 B* -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 21640 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 2666 bytes Desc: not available URL: From timr at probo.com Wed Mar 2 18:26:20 2016 From: timr at probo.com (Tim Roberts) Date: Wed, 2 Mar 2016 09:26:20 -0800 Subject: [PySide] trouble with special characters in widget.setToolTip() In-Reply-To: <56D6B98A.3060702@risefx.com> References: <56D68619.7010008@ohufx.com> <56D6B98A.3060702@risefx.com> Message-ID: <56D7223C.3010308@probo.com> Sebastian Elsner | RISE wrote: > Unicode is tricky, it bites me every time. This works: It's not that hard. There are two possibilities. Either the setTool function does not accept Unicode strings, or the default tool tip font does not include those extended characters. > Please note, the .py file actually has to be saved/encoded as utf-8. > You need to do this via your editor's save/convert function. Actually, it doesn't. There are no characters in his file beyond the base ASCII set, except for the one character in a comment, so the file coding is irrelevant. If this worked for you, then his original code would have worked for you also. That would imply that your tooltip uses a different default font. No one here has mentioned what operating systems they are using; that makes a difference. -- Tim Roberts, timr at probo.com Providenza & Boekelheide, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From frank at ohufx.com Thu Mar 3 01:45:01 2016 From: frank at ohufx.com (Frank Rueter | OHUfx) Date: Thu, 3 Mar 2016 13:45:01 +1300 Subject: [PySide] trouble with special characters in widget.setToolTip() In-Reply-To: <56D7223C.3010308@probo.com> References: <56D68619.7010008@ohufx.com> <56D6B98A.3060702@risefx.com> <56D7223C.3010308@probo.com> Message-ID: <56D7890D.7080402@ohufx.com> Thanks guys. >>That would imply that your tooltip uses a different default font. Aha, that makes perfect sense, thank you! I'm currently on OSX using Wing as my IDE. When I ran this code inside a host application, it worked fine (because it changes the default font). I will verify that though before moving on. Text encoding/decoding always confuses me (I hardly have to deal with it, so there is no routine) and I want to get it right this time. Cheers, frank On 03/03/2016 06:26 AM, Tim Roberts wrote: > Sebastian Elsner | RISE wrote: >> Unicode is tricky, it bites me every time. This works: > > It's not that hard. There are two possibilities. Either the setTool > function does not accept Unicode strings, or the default tool tip font > does not include those extended characters. > > >> Please note, the .py file actually has to be saved/encoded as utf-8. >> You need to do this via your editor's save/convert function. > > Actually, it doesn't. There are no characters in his file beyond the > base ASCII set, except for the one character in a comment, so the file > coding is irrelevant. If this worked for you, then his original code > would have worked for you also. That would imply that your tooltip > uses a different default font. No one here has mentioned what > operating systems they are using; that makes a difference. > -- > Tim Roberts,timr at probo.com > Providenza & Boekelheide, Inc. > > > _______________________________________________ > PySide mailing list > PySide at qt-project.org > http://lists.qt-project.org/mailman/listinfo/pyside -------------- next part -------------- An HTML attachment was scrubbed... URL: From frank at ohufx.com Thu Mar 3 06:16:27 2016 From: frank at ohufx.com (Frank Rueter | OHUfx) Date: Thu, 3 Mar 2016 18:16:27 +1300 Subject: [PySide] trouble with special characters in widget.setToolTip() In-Reply-To: <56D7890D.7080402@ohufx.com> References: <56D68619.7010008@ohufx.com> <56D6B98A.3060702@risefx.com> <56D7223C.3010308@probo.com> <56D7890D.7080402@ohufx.com> Message-ID: <56D7C8AB.8080106@ohufx.com> Hm, I'm not having much luck. Apparently my tooltip and default font is Lucida Grande when running the code inside Wing, which should be able to display quotation marks. I tried changing the font to Verdana, as that is what my host application is using (where I get the corrcet characters), but to no avail. I tried using QtGui.QToolTip.setFont() and QApplication().setFont() but I was still left with the wrong characters. Any more ideas? Cheers, frank On 3/03/16 1:45 pm, Frank Rueter | OHUfx wrote: > Thanks guys. > > >>That would imply that your tooltip uses a different default font. > Aha, that makes perfect sense, thank you! > I'm currently on OSX using Wing as my IDE. When I ran this code inside > a host application, it worked fine (because it changes the default font). > I will verify that though before moving on. Text encoding/decoding > always confuses me (I hardly have to deal with it, so there is no > routine) and I want to get it right this time. > > Cheers, > frank > > On 03/03/2016 06:26 AM, Tim Roberts wrote: >> Sebastian Elsner | RISE wrote: >>> Unicode is tricky, it bites me every time. This works: >> >> It's not that hard. There are two possibilities. Either the setTool >> function does not accept Unicode strings, or the default tool tip >> font does not include those extended characters. >> >> >>> Please note, the .py file actually has to be saved/encoded as utf-8. >>> You need to do this via your editor's save/convert function. >> >> Actually, it doesn't. There are no characters in his file beyond the >> base ASCII set, except for the one character in a comment, so the >> file coding is irrelevant. If this worked for you, then his original >> code would have worked for you also. That would imply that your >> tooltip uses a different default font. No one here has mentioned >> what operating systems they are using; that makes a difference. >> -- >> Tim Roberts,timr at probo.com >> Providenza & Boekelheide, Inc. >> >> >> _______________________________________________ >> PySide mailing list >> PySide at qt-project.org >> http://lists.qt-project.org/mailman/listinfo/pyside > > > > _______________________________________________ > PySide mailing list > PySide at qt-project.org > http://lists.qt-project.org/mailman/listinfo/pyside -- ohufxLogo 50x50 *vfx compositing | *workflow customisation and consulting * * -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ohufxLogo_50x50.png Type: image/png Size: 2666 bytes Desc: not available URL: From milburn at thefoundry.co.uk Thu Mar 3 09:52:54 2016 From: milburn at thefoundry.co.uk (Dan Milburn) Date: Thu, 3 Mar 2016 08:52:54 +0000 Subject: [PySide] trouble with special characters in widget.setToolTip() In-Reply-To: <56D7890D.7080402@ohufx.com> References: <56D68619.7010008@ohufx.com> <56D6B98A.3060702@risefx.com> <56D7223C.3010308@probo.com> <56D7890D.7080402@ohufx.com> Message-ID: Hi, It's not anything to do with the font. Qt uses 16-bit unicode strings internally. If you give a str to a PySide function, it will need to decode it, and by default it will probably treat it as ASCII. If you want Qt to assume 8-bit strings are UTF-8 encoded, you can use the following: from PySide.QtCore import QTextCodec QTextCodec.setCodecForCStrings(QTextCodec.codecForName("UTF-8")) However it would be better practice to pass it unicode strings if you can. Dan On 3 March 2016 at 00:45, Frank Rueter | OHUfx wrote: > Thanks guys. > > >>That would imply that your tooltip uses a different default font. > Aha, that makes perfect sense, thank you! > I'm currently on OSX using Wing as my IDE. When I ran this code inside a > host application, it worked fine (because it changes the default font). > I will verify that though before moving on. Text encoding/decoding always > confuses me (I hardly have to deal with it, so there is no routine) and I > want to get it right this time. > > Cheers, > frank > > > On 03/03/2016 06:26 AM, Tim Roberts wrote: > > Sebastian Elsner | RISE wrote: > > Unicode is tricky, it bites me every time. This works: > > > It's not that hard. There are two possibilities. Either the setTool > function does not accept Unicode strings, or the default tool tip font does > not include those extended characters. > > > Please note, the .py file actually has to be saved/encoded as utf-8. You > need to do this via your editor's save/convert function. > > > Actually, it doesn't. There are no characters in his file beyond the base > ASCII set, except for the one character in a comment, so the file coding is > irrelevant. If this worked for you, then his original code would have > worked for you also. That would imply that your tooltip uses a different > default font. No one here has mentioned what operating systems they are > using; that makes a difference. > > -- > Tim Roberts, timr at probo.com > Providenza & Boekelheide, Inc. > > > > _______________________________________________ > PySide mailing listPySide at qt-project.orghttp://lists.qt-project.org/mailman/listinfo/pyside > > > > _______________________________________________ > PySide mailing list > PySide at qt-project.org > http://lists.qt-project.org/mailman/listinfo/pyside > > -- Dan Milburn Software Engineer - Nuke The Foundry 5 Golden Square London W1F 9HT Tel: +44(0) 20 7479 4350 • Fax: +44 (0)20 7434 2526 • Web: http://www.thefoundry.co.uk The Foundry Visionmongers Ltd. Registered in England and Wales No: 4642027 -------------- next part -------------- An HTML attachment was scrubbed... URL: From thomas.robitaille at gmail.com Thu Mar 3 09:55:10 2016 From: thomas.robitaille at gmail.com (Thomas Robitaille) Date: Thu, 3 Mar 2016 08:55:10 +0000 Subject: [PySide] Parent widget not resizing when adding another widget (loaded from a ui file) to a vertical layout Message-ID: Hi everyone, I'm having an issue that occurs only with PySide (not PyQt). I am doing the following: * Setting up a widget in which I set a vertical layout * Showing the widget * Making another widget defined by a .ui file * Adding this new widget to the vertical layout of the first (this is deliberately done after the first widget has already been shown) If I do this, the first widget is not resized, and when I resize it, the size of the second widget inside does not change. A minimal example is provided here: https://gist.github.com/astrofrog/42c43f74b6a09fe54cf2 However, this does work in PyQt4. Is this a bug in PySide? I found that in my case, a workaround is to do: self.ui = loader.load('options_widget.ui', None) self.setLayout(self.ui.verticalLayout) but this is not ideal, so I wanted to check whether anyone can explain the underlying reason for the behavior? Thanks! Tom From frank at ohufx.com Thu Mar 3 09:59:50 2016 From: frank at ohufx.com (Frank Rueter | OHUfx) Date: Thu, 3 Mar 2016 21:59:50 +1300 Subject: [PySide] sending QStandardItem() as QAction.data() yields None in receiving widget Message-ID: <56D7FD06.3070000@ohufx.com> Hi guys, I ran into this a while ago but since the host application I am using with my PySide apps was still using PySide 1.0.7 it wasn't a problem. Now it's being switched to use PySide 1.2.2 and the bug is back in sight. Below is a test snippet that shows how assigning a QStandardItem via QAction().setData() returns None when QAction().data() is called. Is this a known bug? I guess the work around is to send the data required to re-create the QStandardItem as a dictionary?! http://pastebin.com/E9TCgEfJ Cheers, frank -- ohufxLogo 50x50 *vfx compositing | *workflow customisation and consulting * * -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ohufxLogo_50x50.png Type: image/png Size: 2666 bytes Desc: not available URL: From sdeibel at wingware.com Thu Mar 3 14:20:09 2016 From: sdeibel at wingware.com (Stephan Deibel) Date: Thu, 03 Mar 2016 08:20:09 -0500 Subject: [PySide] trouble with special characters in widget.setToolTip() In-Reply-To: <56D7C8AB.8080106@ohufx.com> References: <56D68619.7010008@ohufx.com> <56D6B98A.3060702@risefx.com> <56D7223C.3010308@probo.com> <56D7890D.7080402@ohufx.com> <56D7C8AB.8080106@ohufx.com> Message-ID: <56D83A09.3020705@wingware.com> Frank Rueter | OHUfx wrote: > Hm, I'm not having much luck. Apparently my tooltip and default font > is Lucida Grande when running the code inside Wing, which should be > able to display quotation marks. I tried changing the font to Verdana, > as that is what my host application is using (where I get the corrcet > characters), but to no avail. > I tried using QtGui.QToolTip.setFont() and QApplication().setFont() > but I was still left with the wrong characters. > > Any more ideas? In Wing, if you are doing this in a shell, the encoding options on the Debugger > I/O preferences page may be relevant. Also, if the strings are in a source file, use a coding comment at the top of the Python file (like "#coding:utf-8"; Wing converts the file if you change or add this) and be sure you're sending correctly encoded strings or unicode strings to PySide. The font can matter if it's missing the necessary unicode glyphs but that probably isn't the issue in this case. - Stephan From lucericml at gmail.com Thu Mar 3 17:01:56 2016 From: lucericml at gmail.com (Luc-Eric Rousseau) Date: Thu, 3 Mar 2016 11:01:56 -0500 Subject: [PySide] trouble with special characters in widget.setToolTip() In-Reply-To: References: <56D68619.7010008@ohufx.com> <56D6B98A.3060702@risefx.com> <56D7223C.3010308@probo.com> <56D7890D.7080402@ohufx.com> Message-ID: That reply from Dan was the correct answer. The reason why the string prints correctly in a console-like UI is because these UI typically expect stings to be UTF-8 and that chunk of bytes you pass it is a valid UTF-8 string. However Qt thinks that chunk of 8 bit character from python is Latin-1 If you made your python string unicode like this, both cases would work myText = u'special charactes cause headaches: {}'.format(quotationMark) it's probably going to work fine also in that other host you use which has set the default 8-bit encoding of Qt to Utf-8, because no encoding will take place. On 3 March 2016 at 03:52, Dan Milburn wrote: > Hi, > > It's not anything to do with the font. > > Qt uses 16-bit unicode strings internally. If you give a str to a PySide > function, it will need to decode it, and by default it will probably treat > it as ASCII. If you want Qt to assume 8-bit strings are UTF-8 encoded, you > can use the following: > > from PySide.QtCore import QTextCodec > > QTextCodec.setCodecForCStrings(QTextCodec.codecForName("UTF-8")) > > > However it would be better practice to pass it unicode strings if you can. > > > Dan > > > > On 3 March 2016 at 00:45, Frank Rueter | OHUfx wrote: >> >> Thanks guys. >> >> >>That would imply that your tooltip uses a different default font. >> Aha, that makes perfect sense, thank you! >> I'm currently on OSX using Wing as my IDE. When I ran this code inside a >> host application, it worked fine (because it changes the default font). >> I will verify that though before moving on. Text encoding/decoding always >> confuses me (I hardly have to deal with it, so there is no routine) and I >> want to get it right this time. >> >> Cheers, >> frank >> >> >> On 03/03/2016 06:26 AM, Tim Roberts wrote: >> >> Sebastian Elsner | RISE wrote: >> >> Unicode is tricky, it bites me every time. This works: >> >> >> It's not that hard. There are two possibilities. Either the setTool >> function does not accept Unicode strings, or the default tool tip font does >> not include those extended characters. >> >> >> Please note, the .py file actually has to be saved/encoded as utf-8. You >> need to do this via your editor's save/convert function. >> >> >> Actually, it doesn't. There are no characters in his file beyond the base >> ASCII set, except for the one character in a comment, so the file coding is >> irrelevant. If this worked for you, then his original code would have >> worked for you also. That would imply that your tooltip uses a different >> default font. No one here has mentioned what operating systems they are >> using; that makes a difference. >> >> -- >> Tim Roberts, timr at probo.com >> Providenza & Boekelheide, Inc. >> >> >> >> _______________________________________________ >> PySide mailing list >> PySide at qt-project.org >> http://lists.qt-project.org/mailman/listinfo/pyside >> >> >> >> _______________________________________________ >> PySide mailing list >> PySide at qt-project.org >> http://lists.qt-project.org/mailman/listinfo/pyside >> > > > > -- > Dan Milburn > Software Engineer - Nuke > The Foundry > 5 Golden Square > London > W1F 9HT > Tel: +44(0) 20 7479 4350 • Fax: +44 (0)20 7434 2526 • Web: > http://www.thefoundry.co.uk > > The Foundry Visionmongers Ltd. > Registered in England and Wales No: 4642027 > > > > > _______________________________________________ > PySide mailing list > PySide at qt-project.org > http://lists.qt-project.org/mailman/listinfo/pyside > From frank at ohufx.com Fri Mar 4 06:19:35 2016 From: frank at ohufx.com (Frank Rueter | OHUfx) Date: Fri, 4 Mar 2016 18:19:35 +1300 Subject: [PySide] trouble with special characters in widget.setToolTip() In-Reply-To: References: <56D68619.7010008@ohufx.com> <56D6B98A.3060702@risefx.com> <56D7223C.3010308@probo.com> <56D7890D.7080402@ohufx.com> Message-ID: <56D91AE7.2030602@ohufx.com> Ah, thanks Dan and Luc for clarifying. I thought I was passing a unicode string when I started messing around with it but obviously I wasn't. It's all working as expected now, thank you all! frank On 4/03/16 5:01 am, Luc-Eric Rousseau wrote: > That reply from Dan was the correct answer. > > The reason why the string prints correctly in a console-like UI is > because these UI typically > expect stings to be UTF-8 and that chunk of bytes you pass it is a > valid UTF-8 string. > > However Qt thinks that chunk of 8 bit character from python is Latin-1 > > If you made your python string unicode like this, both cases would work > > myText = u'special charactes cause headaches: {}'.format(quotationMark) > > it's probably going to work fine also in that other host you use which > has set the default > 8-bit encoding of Qt to Utf-8, because no encoding will take place. > > On 3 March 2016 at 03:52, Dan Milburn wrote: >> Hi, >> >> It's not anything to do with the font. >> >> Qt uses 16-bit unicode strings internally. If you give a str to a PySide >> function, it will need to decode it, and by default it will probably treat >> it as ASCII. If you want Qt to assume 8-bit strings are UTF-8 encoded, you >> can use the following: >> >> from PySide.QtCore import QTextCodec >> >> QTextCodec.setCodecForCStrings(QTextCodec.codecForName("UTF-8")) >> >> >> However it would be better practice to pass it unicode strings if you can. >> >> >> Dan >> >> >> >> On 3 March 2016 at 00:45, Frank Rueter | OHUfx wrote: >>> Thanks guys. >>> >>>>> That would imply that your tooltip uses a different default font. >>> Aha, that makes perfect sense, thank you! >>> I'm currently on OSX using Wing as my IDE. When I ran this code inside a >>> host application, it worked fine (because it changes the default font). >>> I will verify that though before moving on. Text encoding/decoding always >>> confuses me (I hardly have to deal with it, so there is no routine) and I >>> want to get it right this time. >>> >>> Cheers, >>> frank >>> >>> >>> On 03/03/2016 06:26 AM, Tim Roberts wrote: >>> >>> Sebastian Elsner | RISE wrote: >>> >>> Unicode is tricky, it bites me every time. This works: >>> >>> >>> It's not that hard. There are two possibilities. Either the setTool >>> function does not accept Unicode strings, or the default tool tip font does >>> not include those extended characters. >>> >>> >>> Please note, the .py file actually has to be saved/encoded as utf-8. You >>> need to do this via your editor's save/convert function. >>> >>> >>> Actually, it doesn't. There are no characters in his file beyond the base >>> ASCII set, except for the one character in a comment, so the file coding is >>> irrelevant. If this worked for you, then his original code would have >>> worked for you also. That would imply that your tooltip uses a different >>> default font. No one here has mentioned what operating systems they are >>> using; that makes a difference. >>> >>> -- >>> Tim Roberts, timr at probo.com >>> Providenza & Boekelheide, Inc. >>> >>> >>> >>> _______________________________________________ >>> PySide mailing list >>> PySide at qt-project.org >>> http://lists.qt-project.org/mailman/listinfo/pyside >>> >>> >>> >>> _______________________________________________ >>> PySide mailing list >>> PySide at qt-project.org >>> http://lists.qt-project.org/mailman/listinfo/pyside >>> >> >> >> -- >> Dan Milburn >> Software Engineer - Nuke >> The Foundry >> 5 Golden Square >> London >> W1F 9HT >> Tel: +44(0) 20 7479 4350 • Fax: +44 (0)20 7434 2526 • Web: >> http://www.thefoundry.co.uk >> >> The Foundry Visionmongers Ltd. >> Registered in England and Wales No: 4642027 >> >> >> >> >> _______________________________________________ >> PySide mailing list >> PySide at qt-project.org >> http://lists.qt-project.org/mailman/listinfo/pyside >> > _______________________________________________ > PySide mailing list > PySide at qt-project.org > http://lists.qt-project.org/mailman/listinfo/pyside -- ohufxLogo 50x50 *vfx compositing | *workflow customisation and consulting * * -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ohufxLogo_50x50.png Type: image/png Size: 2666 bytes Desc: not available URL: From frank at ohufx.com Fri Mar 4 06:20:53 2016 From: frank at ohufx.com (Frank Rueter | OHUfx) Date: Fri, 4 Mar 2016 18:20:53 +1300 Subject: [PySide] trouble with special characters in widget.setToolTip() In-Reply-To: <56D83A09.3020705@wingware.com> References: <56D68619.7010008@ohufx.com> <56D6B98A.3060702@risefx.com> <56D7223C.3010308@probo.com> <56D7890D.7080402@ohufx.com> <56D7C8AB.8080106@ohufx.com> <56D83A09.3020705@wingware.com> Message-ID: <56D91B35.5080100@ohufx.com> Thanks for clarifying Stephan. I still don't feel 100% on the encoding issue but certainly a lot less ignorant than before :) Cheers, frank On 4/03/16 2:20 am, Stephan Deibel wrote: > Frank Rueter | OHUfx wrote: >> Hm, I'm not having much luck. Apparently my tooltip and default font >> is Lucida Grande when running the code inside Wing, which should be >> able to display quotation marks. I tried changing the font to >> Verdana, as that is what my host application is using (where I get >> the corrcet characters), but to no avail. >> I tried using QtGui.QToolTip.setFont() and QApplication().setFont() >> but I was still left with the wrong characters. >> >> Any more ideas? > > In Wing, if you are doing this in a shell, the encoding options on the > Debugger > I/O preferences page may be relevant. Also, if the strings > are in a source file, use a coding comment at the top of the Python > file (like "#coding:utf-8"; Wing converts the file if you change or > add this) and be sure you're sending correctly encoded strings or > unicode strings to PySide. The font can matter if it's missing the > necessary unicode glyphs but that probably isn't the issue in this case. > > - Stephan > -- ohufxLogo 50x50 *vfx compositing | *workflow customisation and consulting * * -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ohufxLogo_50x50.png Type: image/png Size: 2666 bytes Desc: not available URL: From frank at ohufx.com Fri Mar 4 08:20:37 2016 From: frank at ohufx.com (Frank Rueter | OHUfx) Date: Fri, 4 Mar 2016 20:20:37 +1300 Subject: [PySide] sending QStandardItem() as QAction.data() yields None in receiving widget In-Reply-To: <56D7FD06.3070000@ohufx.com> References: <56D7FD06.3070000@ohufx.com> Message-ID: <56D93745.2090005@ohufx.com> So a better workaround I just found is to write a custom action that sends the required data via a custom signal like this: class CustomAction(QAction): customData = Signal(list) def __init__(self, icon, text, parent): super(CustomAction, self).__init__(icon, text, parent) self.myData = [] self.triggered.connect(self.emitCustomSignal) def setCustomData(self, data): self.myData = data def emitCustomSignal(self): self.customData.emit(self.myData) Seems to work as a band aid. frank On 3/03/16 9:59 pm, Frank Rueter | OHUfx wrote: > > Hi guys, > > > I ran into this a while ago but since the host application I am using > with my PySide apps was still using PySide 1.0.7 it wasn't a problem. > Now it's being switched to use PySide 1.2.2 and the bug is back in sight. > > Below is a test snippet that shows how assigning a QStandardItem via > QAction().setData() returns None when QAction().data() is called. > > Is this a known bug? > > I guess the work around is to send the data required to re-create the > QStandardItem as a dictionary?! > > > http://pastebin.com/E9TCgEfJ > > > Cheers, > frank > > > > -- > ohufxLogo 50x50 *vfx compositing > | *workflow customisation > and consulting * * > > > > _______________________________________________ > PySide mailing list > PySide at qt-project.org > http://lists.qt-project.org/mailman/listinfo/pyside -- ohufxLogo 50x50 *vfx compositing | *workflow customisation and consulting * * -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 2666 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ohufxLogo_50x50.png Type: image/png Size: 2666 bytes Desc: not available URL: From frank at ohufx.com Thu Mar 10 05:15:17 2016 From: frank at ohufx.com (Frank Rueter | OHUfx) Date: Thu, 10 Mar 2016 17:15:17 +1300 Subject: [PySide] image file with certain file name won't compile via pyside-rcc Message-ID: <56E0F4D5.905@ohufx.com> Hi guys, I have been seeing this issue for ages now and finally decided to try and fix it, however, even after writing a tiny little test case I still cannot get to the bottom of this, so I am hoping you guys can help: pyside-rc refuses to compile an image file with a certain name and I don't know why. Here is the simple test case that reproduces the issue (all required files are in the attached zip file): I have a few icons like this: ../sandbox/resourceTest/icons/other.svg ../sandbox/resourceTest/icons/particles.svg ../sandbox/resourceTest/icons/presets.svg I need to compile these icons into a resource module, so I have created a resource.qrc file on the same level as the "icons" directory which looks like this: icons/other.svg icons/particles.svg icons/presets.svg I then compile the resource file with this command line: pyside-rcc -o resources.py resources.qrc To test the contents of the resource file I run the following test code ("qiteratorTest.py" in the zip): from PySide import QtCore import sys import resources it = QtCore.QDirIterator(':/icons',filter=QtCore.QDir.Files, flags=QtCore.QDirIterator.Subdirectories) while it.hasNext(): info = it.fileInfo() print '{} exists: {}'.format(info.baseName(), info.exists()) it.next() The result is this: exists: False presets exists: True other exists: True No matter what I do, I cannot get pyside to compile the file called "particles.svg". To make matters more interesting, I duplicated the same file and renamed it to the above file names ("other.svg", "particles.svg" and "presets.svg"). But I still get the same result, so it's clearly not related to the file itself, but it's name. I have been struggling with this problem for ages now. If anybody has any ideas, I would be very, very grateful! Cheers, frank -- ohufxLogo 50x50 *vfx compositing | *workflow customisation and consulting * * -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ohufxLogo_50x50.png Type: image/png Size: 2666 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: resourceTest.zip Type: application/zip Size: 7546 bytes Desc: not available URL: From frank at ohufx.com Thu Mar 10 21:06:00 2016 From: frank at ohufx.com (Frank Rueter | OHUfx) Date: Fri, 11 Mar 2016 09:06:00 +1300 Subject: [PySide] image file with certain file name won't compile via pyside-rcc In-Reply-To: References: <56E0F4D5.905@ohufx.com> Message-ID: <56E1D3A8.1020601@ohufx.com> Matthieu, you made my day!!! I did read up on QDirIterator but clearly didn't see the woods for the trees. Thanks!! frank On 10/03/16 10:50 pm, Matthieu Cadet wrote: > It seems that the problem come from your while block, > I get the same bug, but if you put it.next() before .fileInfo(), > it works ;) > > while it.hasNext(): > it.next() > info = it.fileInfo() > > According to the Qt documentation "After construction, the iterator is > located before the first directory entry. Here's how to iterate over > all the entries sequentially:" > > QDirIterator it("/etc", QDirIterator::Subdirectories); > while (it.hasNext()) { > qDebug ()<< it.next(); > > // /etc/. > // /etc/.. > // /etc/X11 > // /etc/X11/fs > // ... > } > Hope this will works for you too ;) > > On Thu, Mar 10, 2016 at 5:15 AM, Frank Rueter | OHUfx > wrote: > > Hi guys, > > I have been seeing this issue for ages now and finally decided to > try and fix it, however, even after writing a tiny little test > case I still cannot get to the bottom of this, so I am hoping you > guys can help: > pyside-rc refuses to compile an image file with a certain name and > I don't know why. > Here is the simple test case that reproduces the issue (all > required files are in the attached zip file): > > I have a few icons like this: > ../sandbox/resourceTest/icons/other.svg > ../sandbox/resourceTest/icons/particles.svg > ../sandbox/resourceTest/icons/presets.svg > > I need to compile these icons into a resource module, so I have > created a resource.qrc file on the same level as the "icons" > directory which looks like this: > > > icons/other.svg > icons/particles.svg > icons/presets.svg > > > > I then compile the resource file with this command line: > pyside-rcc -o resources.py resources.qrc > > To test the contents of the resource file I run the following test > code ("qiteratorTest.py" in the zip): > > from PySide import QtCore > import sys > import resources > > it = QtCore.QDirIterator(':/icons',filter=QtCore.QDir.Files, > flags=QtCore.QDirIterator.Subdirectories) > while it.hasNext(): > info = it.fileInfo() > print '{} exists: {}'.format(info.baseName(), info.exists()) > it.next() > > The result is this: > > exists: False > presets exists: True > other exists: True > > No matter what I do, I cannot get pyside to compile the file > called "particles.svg". > To make matters more interesting, I duplicated the same file and > renamed it to the above file names ("other.svg", "particles.svg" > and "presets.svg"). But I still get the same result, so it's > clearly not related to the file itself, but it's name. > > I have been struggling with this problem for ages now. If anybody > has any ideas, I would be very, very grateful! > > Cheers, > frank > > > -- > ohufxLogo 50x50 *vfx compositing > | *workflow > customisation and consulting > * * > > > _______________________________________________ > PySide mailing list > PySide at qt-project.org > http://lists.qt-project.org/mailman/listinfo/pyside > > > > > -- > Matthieu Cadet > Compositor Artist & TD, > nWave Digital > matthieu.cadet at gmail.com -- ohufxLogo 50x50 *vfx compositing | *workflow customisation and consulting * * -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 2666 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ohufxLogo_50x50.png Type: image/png Size: 2666 bytes Desc: not available URL: From frank at ohufx.com Fri Mar 11 07:46:59 2016 From: frank at ohufx.com (Frank Rueter | OHUfx) Date: Fri, 11 Mar 2016 19:46:59 +1300 Subject: [PySide] QLabel crops pixmap Message-ID: <56E269E3.8030709@ohufx.com> 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 *vfx compositing | *workflow customisation and consulting * * -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ohufxLogo_50x50.png Type: image/png Size: 2666 bytes Desc: not available URL: From frank at ohufx.com Mon Mar 14 03:36:54 2016 From: frank at ohufx.com (Frank Rueter | OHUfx) Date: Mon, 14 Mar 2016 15:36:54 +1300 Subject: [PySide] QLabel crops pixmap In-Reply-To: <56E269E3.8030709@ohufx.com> References: <56E269E3.8030709@ohufx.com> Message-ID: <56E623C6.6000109@ohufx.com> Hi all, so I have realised that its not the QLabel but the QPixmap in combination to a vector graphic (svg). Below is my test code which works fine on osx but crops the image on the right hand side when run under windows. The svg was saved with a 200 pixel output resolution in the header, and when I check the QPixmap's width it does return 200, still it crops the image. Do I actually have to start using Qt.QSvgRender for something simple like this? Cheers, frank from PySide import QtGui def pixmapTest(imgPath): l = QtGui.QLabel() l.setPixmap(QtGui.QPixmap(imgPath)) return l if __name__ == '__main__': import sys app = QtGui.QApplication([]) if sys.platform == 'win32': imgPath = 'z:/path/to/svg/image.svg' else: imgPath = '/server/path/path/to/svg/image.svg' l = pixmapTest(imgPath) l.show() sys.exit(app.exec_()) On 11/03/16 7:46 pm, Frank Rueter | OHUfx wrote: > > 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 *vfx compositing > | *workflow customisation > and consulting * * > > > > _______________________________________________ > PySide mailing list > PySide at qt-project.org > http://lists.qt-project.org/mailman/listinfo/pyside -- ohufxLogo 50x50 *vfx compositing | *workflow customisation and consulting * * -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 2666 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ohufxLogo_50x50.png Type: image/png Size: 2666 bytes Desc: not available URL: From frank at ohufx.com Mon Mar 14 20:51:45 2016 From: frank at ohufx.com (Frank Rueter | OHUfx) Date: Tue, 15 Mar 2016 08:51:45 +1300 Subject: [PySide] QLabel crops pixmap In-Reply-To: <56E623C6.6000109@ohufx.com> References: <56E269E3.8030709@ohufx.com> <56E623C6.6000109@ohufx.com> Message-ID: <56E71651.9070001@ohufx.com> Nobody? Guess I will use pngs then until I can figure this out. On 14/03/16 3:36 pm, Frank Rueter | OHUfx wrote: > Hi all, > > so I have realised that its not the QLabel but the QPixmap in > combination to a vector graphic (svg). > Below is my test code which works fine on osx but crops the image on > the right hand side when run under windows. > The svg was saved with a 200 pixel output resolution in the header, > and when I check the QPixmap's width it does return 200, still it > crops the image. > Do I actually have to start using Qt.QSvgRender for something simple > like this? > > Cheers, > frank > > > from PySide import QtGui > def pixmapTest(imgPath): > l = QtGui.QLabel() > l.setPixmap(QtGui.QPixmap(imgPath)) > return l > > if __name__ == '__main__': > import sys > app = QtGui.QApplication([]) > if sys.platform == 'win32': > imgPath = 'z:/path/to/svg/image.svg' > else: > imgPath = '/server/path/path/to/svg/image.svg' > l = pixmapTest(imgPath) > l.show() > sys.exit(app.exec_()) > > On 11/03/16 7:46 pm, Frank Rueter | OHUfx wrote: >> >> 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 *vfx compositing >> | *workflow >> customisation and consulting >> * * >> >> >> >> _______________________________________________ >> PySide mailing list >> PySide at qt-project.org >> http://lists.qt-project.org/mailman/listinfo/pyside > > -- > ohufxLogo 50x50 *vfx compositing > | *workflow customisation > and consulting * * > > > > _______________________________________________ > PySide mailing list > PySide at qt-project.org > http://lists.qt-project.org/mailman/listinfo/pyside -- ohufxLogo 50x50 *vfx compositing | *workflow customisation and consulting * * -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 2666 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 2666 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ohufxLogo_50x50.png Type: image/png Size: 2666 bytes Desc: not available URL: From sean at seanfisk.com Fri Mar 18 22:28:33 2016 From: sean at seanfisk.com (Sean Fisk) Date: Fri, 18 Mar 2016 17:28:33 -0400 Subject: [PySide] QLabel crops pixmap In-Reply-To: <56E71651.9070001@ohufx.com> References: <56E269E3.8030709@ohufx.com> <56E623C6.6000109@ohufx.com> <56E71651.9070001@ohufx.com> Message-ID: Hi Frank, I’m mostly seeing similar results. Here is my test program: #!/usr/bin/env python import sysimport argparse from PySide import QtGui arg_parser = argparse.ArgumentParser( description='Display an SVG via QPixmap.') arg_parser.add_argument('svg_path', help='SVG file to display') args = arg_parser.parse_args() app = QtGui.QApplication([]) pixmap = QtGui.QPixmap(args.svg_path) label = QtGui.QLabel() label.setPixmap(pixmap) label.show() label.raise_() sys.exit(app.exec_()) OS XWindows [image: Inline image 3] [image: Inline image 2] The SVG does not display at all under Windows. However, checking the documentation for QPixmap suggests checking QImageReader::supportedImageFormats() for a full list of formats. Doing this yields: #!/usr/bin/env python from __future__ import print_function from PySide import QtGui print(*QtGui.QImageReader.supportedImageFormats(), sep='\n') OS XWindows bmp gif ico jpeg jpg mng pbm pgm png ppm svg svgz tga tif tiff xbm xpm bmp gif ico jpeg jpg mng pbm pgm png ppm tga tif tiff xbm xpm SVG and SVGZ are not on the list for Windows. This indicates to me that Qt will either not display those image types or display them incorrectly. I would personally suggest using QSvgWidget, which utilizes QSvgRenderer but is a lot easier to use. This works for me on both operating systems: #!/usr/bin/env python import sysimport argparse from PySide import QtGui, QtSvg arg_parser = argparse.ArgumentParser( description='Display an SVG via QSvgWidget.') arg_parser.add_argument('svg_path', help='SVG file to display') args = arg_parser.parse_args() app = QtGui.QApplication([]) widget = QtSvg.QSvgWidget(args.svg_path) widget.show() widget.raise_() sys.exit(app.exec_()) OS XWindows [image: Inline image 4] [image: Inline image 5] If you’re like me, it bothers you that Qt does not respect the aspect ratio of the SVG on resize. For that, I created AspectRatioSvgWidget: from __future__ import division class AspectRatioSvgWidget(QtSvg.QSvgWidget): def paintEvent(self, paint_event): painter = QtGui.QPainter(self) default_width, default_height = self.renderer().defaultSize().toTuple() widget_width, widget_height = self.size().toTuple() ratio_x = widget_width / default_width ratio_y = widget_height / default_height if ratio_x < ratio_y: new_width = widget_width new_height = widget_width * default_height / default_width new_left = 0 new_top = (widget_height - new_height) / 2 else: new_width = widget_height * default_width / default_height new_height = widget_height new_left = (widget_width - new_width) / 2 new_top = 0 self.renderer().render( painter, QtCore.QRectF(new_left, new_top, new_width, new_height)) I’ve included a copy of all the sources including the test SVG I used in an attachment. Hope this helps, Frank! Let me know :) ~ Sean Versions of everything: OS XWindows Platform: Darwin-14.5.0-x86_64-i386-64bit Darwin version info: (‘10.10.5’, (‘’, ‘’, ‘’), ‘x86_64’) Python compiler: GCC 4.2.1 Compatible Apple LLVM 7.0.2 (clang-700.1.81) Python version: CPython 2.7.11 Python interpreter architecture: bits=’64bit’ linkage=’’ PySide version: 1.2.4 PySide version tuple: (1, 2, 4, ‘final’, 0) Compiled with Qt: 4.8.7 Running with Qt: 4.8.7 Platform: Windows-8.1-6.3.9600 Windows version info: (‘8.1’, ‘6.3.9600’, ‘’, u’Multiprocessor Free’) Python compiler: MSC v.1500 64 bit (AMD64) Python version: CPython 2.7.11 Python interpreter architecture: bits=’64bit’ linkage=’WindowsPE’ PySide version: 1.2.4 PySide version tuple: (1, 2, 4, ‘final’, 0) Compiled with Qt: 4.8.7 Running with Qt: 4.8.7 #!/usr/bin/env python from __future__ import print_functionimport platformimport argparse import PySide arg_parser = argparse.ArgumentParser( description='Print information about the platform, Python, and PySide.') arg_parser.parse_args() platform_funcs = dict( Windows=platform.win32_ver, Darwin=platform.mac_ver, Linux=platform.linux_distribution, ) system = platform.system() for key, val in [ ('Platform', platform.platform()), ('{} version info'.format(system), platform_funcs[system]()), ('Python compiler', platform.python_compiler()), ('Python version', '{} {}'.format( platform.python_implementation(), platform.python_version())), ('Python interpreter architecture', 'bits={!r} linkage={!r}'.format(*platform.architecture())), ('PySide version', PySide.__version__), ('PySide version tuple', PySide.__version_info__), ('Compiled with Qt', PySide.QtCore.__version__), ('Running with Qt', PySide.QtCore.qVersion()), ]: print('{}: {}'.format(key, val)) ​ -- Sean Fisk On Mon, Mar 14, 2016 at 3:51 PM, Frank Rueter | OHUfx wrote: > Nobody? > Guess I will use pngs then until I can figure this out. > > > On 14/03/16 3:36 pm, Frank Rueter | OHUfx wrote: > > Hi all, > > so I have realised that its not the QLabel but the QPixmap in combination > to a vector graphic (svg). > Below is my test code which works fine on osx but crops the image on the > right hand side when run under windows. > The svg was saved with a 200 pixel output resolution in the header, and > when I check the QPixmap's width it does return 200, still it crops the > image. > Do I actually have to start using Qt.QSvgRender for something simple like > this? > > Cheers, > frank > > > from PySide import QtGui > def pixmapTest(imgPath): > l = QtGui.QLabel() > l.setPixmap(QtGui.QPixmap(imgPath)) > return l > > if __name__ == '__main__': > import sys > app = QtGui.QApplication([]) > if sys.platform == 'win32': > imgPath = 'z:/path/to/svg/image.svg' > else: > imgPath = '/server/path/path/to/svg/image.svg' > l = pixmapTest(imgPath) > l.show() > sys.exit(app.exec_()) > > On 11/03/16 7:46 pm, Frank Rueter | OHUfx wrote: > > 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() > > -- > [image: ohufxLogo 50x50] *vfx compositing > | workflow customisation and > consulting * > > > _______________________________________________ > PySide mailing listPySide at qt-project.orghttp://lists.qt-project.org/mailman/listinfo/pyside > > > -- > [image: ohufxLogo 50x50] *vfx compositing > | workflow customisation and > consulting * > > > _______________________________________________ > PySide mailing listPySide at qt-project.orghttp://lists.qt-project.org/mailman/listinfo/pyside > > > -- > [image: ohufxLogo 50x50] *vfx compositing > | workflow customisation and > consulting * > > _______________________________________________ > PySide mailing list > PySide at qt-project.org > http://lists.qt-project.org/mailman/listinfo/pyside > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 2666 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: pixmap-osx.png Type: image/png Size: 27856 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: svgwidget-win.png Type: image/png Size: 7528 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: svgwidget-osx.png Type: image/png Size: 28639 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: pixmap-win.png Type: image/png Size: 959 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ohufxLogo_50x50.png Type: image/png Size: 2666 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 2666 bytes Desc: not available URL: From sean at seanfisk.com Fri Mar 18 22:30:34 2016 From: sean at seanfisk.com (Sean Fisk) Date: Fri, 18 Mar 2016 21:30:34 +0000 Subject: [PySide] QLabel crops pixmap In-Reply-To: References: <56E269E3.8030709@ohufx.com> <56E623C6.6000109@ohufx.com> <56E71651.9070001@ohufx.com> Message-ID: Oops, forgot the attachment! Here you go. On Fri, Mar 18, 2016 at 5:28 PM Sean Fisk wrote: > Hi Frank, > > I’m mostly seeing similar results. Here is my test program: > > #!/usr/bin/env python > import sysimport argparse > from PySide import QtGui > > arg_parser = argparse.ArgumentParser( > description='Display an SVG via QPixmap.') > arg_parser.add_argument('svg_path', help='SVG file to display') > args = arg_parser.parse_args() > > app = QtGui.QApplication([]) > > pixmap = QtGui.QPixmap(args.svg_path) > label = QtGui.QLabel() > label.setPixmap(pixmap) > > label.show() > label.raise_() > > sys.exit(app.exec_()) > > OS XWindows > [image: pixmap-osx.png] [image: pixmap-win.png] > > The SVG does not display at all under Windows. However, checking the > documentation for QPixmap > > suggests checking QImageReader::supportedImageFormats() for a full list > of formats. Doing this yields: > > #!/usr/bin/env python > from __future__ import print_function > from PySide import QtGui > > print(*QtGui.QImageReader.supportedImageFormats(), sep='\n') > > OS XWindows > > bmp > gif > ico > jpeg > jpg > mng > pbm > pgm > png > ppm > svg > svgz > tga > tif > tiff > xbm > xpm > > bmp > gif > ico > jpeg > jpg > mng > pbm > pgm > png > ppm > tga > tif > tiff > xbm > xpm > > SVG and SVGZ are not on the list for Windows. This indicates to me that Qt > will either not display those image types or display them incorrectly. I > would personally suggest using QSvgWidget, which utilizes QSvgRenderer > but is a lot easier to use. This works for me on both operating systems: > > #!/usr/bin/env python > import sysimport argparse > from PySide import QtGui, QtSvg > > arg_parser = argparse.ArgumentParser( > description='Display an SVG via QSvgWidget.') > arg_parser.add_argument('svg_path', help='SVG file to display') > args = arg_parser.parse_args() > > app = QtGui.QApplication([]) > > widget = QtSvg.QSvgWidget(args.svg_path) > > widget.show() > widget.raise_() > > sys.exit(app.exec_()) > > OS XWindows > [image: svgwidget-osx.png] [image: svgwidget-win.png] > > If you’re like me, it bothers you that Qt does not respect the aspect > ratio of the SVG on resize. For that, I created AspectRatioSvgWidget: > > from __future__ import division > class AspectRatioSvgWidget(QtSvg.QSvgWidget): > def paintEvent(self, paint_event): > painter = QtGui.QPainter(self) > default_width, default_height = self.renderer().defaultSize().toTuple() > widget_width, widget_height = self.size().toTuple() > ratio_x = widget_width / default_width > ratio_y = widget_height / default_height > if ratio_x < ratio_y: > new_width = widget_width > new_height = widget_width * default_height / default_width > new_left = 0 > new_top = (widget_height - new_height) / 2 > else: > new_width = widget_height * default_width / default_height > new_height = widget_height > new_left = (widget_width - new_width) / 2 > new_top = 0 > self.renderer().render( > painter, > QtCore.QRectF(new_left, new_top, new_width, new_height)) > > I’ve included a copy of all the sources including the test SVG I used in > an attachment. Hope this helps, Frank! Let me know :) > > ~ Sean > > Versions of everything: > > OS XWindows > > Platform: Darwin-14.5.0-x86_64-i386-64bit > Darwin version info: (‘10.10.5’, (‘’, ‘’, ‘’), ‘x86_64’) > Python compiler: GCC 4.2.1 Compatible Apple LLVM 7.0.2 (clang-700.1.81) > Python version: CPython 2.7.11 > Python interpreter architecture: bits=’64bit’ linkage=’’ > PySide version: 1.2.4 > PySide version tuple: (1, 2, 4, ‘final’, 0) > Compiled with Qt: 4.8.7 > Running with Qt: 4.8.7 > > Platform: Windows-8.1-6.3.9600 > Windows version info: (‘8.1’, ‘6.3.9600’, ‘’, u’Multiprocessor Free’) > Python compiler: MSC v.1500 64 bit (AMD64) > Python version: CPython 2.7.11 > Python interpreter architecture: bits=’64bit’ linkage=’WindowsPE’ > PySide version: 1.2.4 > PySide version tuple: (1, 2, 4, ‘final’, 0) > Compiled with Qt: 4.8.7 > Running with Qt: 4.8.7 > > #!/usr/bin/env python > from __future__ import print_functionimport platformimport argparse > import PySide > > arg_parser = argparse.ArgumentParser( > description='Print information about the platform, Python, and PySide.') > arg_parser.parse_args() > > platform_funcs = dict( > Windows=platform.win32_ver, > Darwin=platform.mac_ver, > Linux=platform.linux_distribution, > ) > system = platform.system() > for key, val in [ > ('Platform', platform.platform()), > ('{} version info'.format(system), platform_funcs[system]()), > ('Python compiler', platform.python_compiler()), > ('Python version', '{} {}'.format( > platform.python_implementation(), platform.python_version())), > ('Python interpreter architecture', > 'bits={!r} linkage={!r}'.format(*platform.architecture())), > ('PySide version', PySide.__version__), > ('PySide version tuple', PySide.__version_info__), > ('Compiled with Qt', PySide.QtCore.__version__), > ('Running with Qt', PySide.QtCore.qVersion()), > ]: > print('{}: {}'.format(key, val)) > > ​ > > > -- > Sean Fisk > > On Mon, Mar 14, 2016 at 3:51 PM, Frank Rueter | OHUfx > wrote: > >> Nobody? >> Guess I will use pngs then until I can figure this out. >> >> >> On 14/03/16 3:36 pm, Frank Rueter | OHUfx wrote: >> >> Hi all, >> >> so I have realised that its not the QLabel but the QPixmap in combination >> to a vector graphic (svg). >> Below is my test code which works fine on osx but crops the image on the >> right hand side when run under windows. >> The svg was saved with a 200 pixel output resolution in the header, and >> when I check the QPixmap's width it does return 200, still it crops the >> image. >> Do I actually have to start using Qt.QSvgRender for something simple like >> this? >> >> Cheers, >> frank >> >> >> from PySide import QtGui >> def pixmapTest(imgPath): >> l = QtGui.QLabel() >> l.setPixmap(QtGui.QPixmap(imgPath)) >> return l >> >> if __name__ == '__main__': >> import sys >> app = QtGui.QApplication([]) >> if sys.platform == 'win32': >> imgPath = 'z:/path/to/svg/image.svg' >> else: >> imgPath = '/server/path/path/to/svg/image.svg' >> l = pixmapTest(imgPath) >> l.show() >> sys.exit(app.exec_()) >> >> On 11/03/16 7:46 pm, Frank Rueter | OHUfx wrote: >> >> 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() >> >> -- >> *vfx compositing >> | workflow customisation and >> consulting * >> >> >> _______________________________________________ >> PySide mailing listPySide at qt-project.orghttp://lists.qt-project.org/mailman/listinfo/pyside >> >> >> -- >> [image: ohufxLogo 50x50] *vfx compositing >> | workflow customisation and >> consulting * >> >> >> _______________________________________________ >> PySide mailing listPySide at qt-project.orghttp://lists.qt-project.org/mailman/listinfo/pyside >> >> >> -- >> [image: ohufxLogo_50x50.png] *vfx compositing >> | workflow customisation and >> consulting * >> >> _______________________________________________ >> PySide mailing list >> PySide at qt-project.org >> http://lists.qt-project.org/mailman/listinfo/pyside >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 2666 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: pixmap-osx.png Type: image/png Size: 27856 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: svgwidget-win.png Type: image/png Size: 7528 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: svgwidget-osx.png Type: image/png Size: 28639 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: pixmap-win.png Type: image/png Size: 959 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ohufxLogo_50x50.png Type: image/png Size: 2666 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 2666 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: frank-svg.zip Type: application/zip Size: 68017 bytes Desc: not available URL: From timr at probo.com Fri Mar 18 22:47:20 2016 From: timr at probo.com (Tim Roberts) Date: Fri, 18 Mar 2016 14:47:20 -0700 Subject: [PySide] When Slots and When Subclass? Message-ID: <56EC7768.9070208@probo.com> I'm coming to Qt late, after a long history with wxPython (and an even longer history with direct-to-the API coding). There's one item that is tripping me up. In wxPython and wxWidgets, EVERYTHING you can respond to is an event. When you want to handle some GUI thing, you look for an event to bind to. Since Qt is, in general, more orderly than wx, I had assumed that Qt would be much the same, substituting signals and slots. I've already found that's not the case; in order to intercept keystrokes, I have to subclass the control and provide a a keyPressEvent method. Is there some document that can help me understand what's likely to be signalled and what requires subclassing? Some general rule you use in practice? -- Tim Roberts, timr at probo.com Providenza & Boekelheide, Inc. From me at the-compiler.org Fri Mar 18 22:54:39 2016 From: me at the-compiler.org (Florian Bruhin) Date: Fri, 18 Mar 2016 22:54:39 +0100 Subject: [PySide] When Slots and When Subclass? In-Reply-To: <56EC7768.9070208@probo.com> References: <56EC7768.9070208@probo.com> Message-ID: <20160318215439.GV11428@tonks> * Tim Roberts [2016-03-18 14:47:20 -0700]: > Is there some document that can help me understand what's likely to be > signalled and what requires subclassing? Some general rule you use in > practice? In general, things you'd control via subclassing are much more low-level (like Qt's whole event system), and signals are much more high-level. For example, with a QLineEdit, you could override keyPressEvent to get low-level keypresses - or use the returnPressed signal, which works with enter/return, and only emits when the input is valid if a validator is set. But there are certainly some exceptions (usually things which require subclassing which IMHO would be much nicer as a signal). Florian -- http://www.the-compiler.org | me at the-compiler.org (Mail/XMPP) GPG: 916E B0C8 FD55 A072 | http://the-compiler.org/pubkey.asc I love long mails! | http://email.is-not-s.ms/ -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: From frank at ohufx.com Fri Mar 18 23:23:48 2016 From: frank at ohufx.com (Frank Rueter | OHUfx) Date: Sat, 19 Mar 2016 11:23:48 +1300 Subject: [PySide] QLabel crops pixmap In-Reply-To: References: <56E269E3.8030709@ohufx.com> <56E623C6.6000109@ohufx.com> <56E71651.9070001@ohufx.com> Message-ID: <56EC7FF4.10507@ohufx.com> Great, thanks a lot Sean! I have to run now but will take a closer look on the weekend. Cheers, frank On 19/03/16 10:30 am, Sean Fisk wrote: > Oops, forgot the attachment! Here you go. > > On Fri, Mar 18, 2016 at 5:28 PM Sean Fisk > wrote: > > Hi Frank, > > I’m mostly seeing similar results. Here is my test program: > > |#!/usr/bin/env python import sys import argparse from PySide > import QtGui arg_parser = argparse.ArgumentParser( > description='Display an SVG via QPixmap.') > arg_parser.add_argument('svg_path', help='SVG file to display') > args = arg_parser.parse_args() app = QtGui.QApplication([]) pixmap > = QtGui.QPixmap(args.svg_path) label = QtGui.QLabel() > label.setPixmap(pixmap) label.show() label.raise_() > sys.exit(app.exec_()) | > > OS X Windows > pixmap-osx.png pixmap-win.png > > The SVG does not display at all under Windows. However, checking > the documentation for |QPixmap| > > suggests checking |QImageReader::supportedImageFormats()| for a > full list of formats. Doing this yields: > > |#!/usr/bin/env python from __future__ import print_function from > PySide import QtGui > print(*QtGui.QImageReader.supportedImageFormats(), sep='\n') | > > OS X Windows > > bmp > gif > ico > jpeg > jpg > mng > pbm > pgm > png > ppm > svg > svgz > tga > tif > tiff > xbm > xpm > > > > bmp > gif > ico > jpeg > jpg > mng > pbm > pgm > png > ppm > tga > tif > tiff > xbm > xpm > > SVG and SVGZ are not on the list for Windows. This indicates to me > that Qt will either not display those image types or display them > incorrectly. I would personally suggest using |QSvgWidget|, which > utilizes |QSvgRenderer| but is a lot easier to use. This works for > me on both operating systems: > > |#!/usr/bin/env python import sys import argparse from PySide > import QtGui, QtSvg arg_parser = argparse.ArgumentParser( > description='Display an SVG via QSvgWidget.') > arg_parser.add_argument('svg_path', help='SVG file to display') > args = arg_parser.parse_args() app = QtGui.QApplication([]) widget > = QtSvg.QSvgWidget(args.svg_path) widget.show() widget.raise_() > sys.exit(app.exec_()) | > > OS X Windows > svgwidget-osx.png svgwidget-win.png > > If you’re like me, it bothers you that Qt does not respect the > aspect ratio of the SVG on resize. For that, I created > |AspectRatioSvgWidget|: > > |from __future__ import division class > AspectRatioSvgWidget(QtSvg.QSvgWidget): def paintEvent(self, > paint_event): painter = QtGui.QPainter(self) default_width, > default_height = self.renderer().defaultSize().toTuple() > widget_width, widget_height = self.size().toTuple() ratio_x = > widget_width / default_width ratio_y = widget_height / > default_height if ratio_x < ratio_y: new_width = widget_width > new_height = widget_width * default_height / default_width > new_left = 0 new_top = (widget_height - new_height) / 2 else: > new_width = widget_height * default_width / default_height > new_height = widget_height new_left = (widget_width - new_width) / > 2 new_top = 0 self.renderer().render( painter, > QtCore.QRectF(new_left, new_top, new_width, new_height)) | > > I’ve included a copy of all the sources including the test SVG I > used in an attachment. Hope this helps, Frank! Let me know :) > > ~ Sean > > Versions of everything: > > OS X Windows > > Platform: Darwin-14.5.0-x86_64-i386-64bit > Darwin version info: (‘10.10.5’, (‘’, ‘’, ‘’), ‘x86_64’) > Python compiler: GCC 4.2.1 Compatible Apple LLVM 7.0.2 (clang-700.1.81) > Python version: CPython 2.7.11 > Python interpreter architecture: bits=’64bit’ linkage=’’ > PySide version: 1.2.4 > PySide version tuple: (1, 2, 4, ‘final’, 0) > Compiled with Qt: 4.8.7 > Running with Qt: 4.8.7 > > > > Platform: Windows-8.1-6.3.9600 > Windows version info: (‘8.1’, ‘6.3.9600’, ‘’, u’Multiprocessor Free’) > Python compiler: MSC v.1500 64 bit (AMD64) > Python version: CPython 2.7.11 > Python interpreter architecture: bits=’64bit’ linkage=’WindowsPE’ > PySide version: 1.2.4 > PySide version tuple: (1, 2, 4, ‘final’, 0) > Compiled with Qt: 4.8.7 > Running with Qt: 4.8.7 > > |#!/usr/bin/env python from __future__ import print_function import > platform import argparse import PySide arg_parser = > argparse.ArgumentParser( description='Print information about the > platform, Python, and PySide.') arg_parser.parse_args() > platform_funcs = dict( Windows=platform.win32_ver, > Darwin=platform.mac_ver, Linux=platform.linux_distribution, ) > system = platform.system() for key, val in [ ('Platform', > platform.platform()), ('{} version info'.format(system), > platform_funcs[system]()), ('Python compiler', > platform.python_compiler()), ('Python version', '{} {}'.format( > platform.python_implementation(), platform.python_version())), > ('Python interpreter architecture', 'bits={!r} > linkage={!r}'.format(*platform.architecture())), ('PySide > version', PySide.__version__), ('PySide version tuple', > PySide.__version_info__), ('Compiled with Qt', > PySide.QtCore.__version__), ('Running with Qt', > PySide.QtCore.qVersion()), ]: print('{}: {}'.format(key, val)) | > > ​ > > > -- > Sean Fisk > > On Mon, Mar 14, 2016 at 3:51 PM, Frank Rueter | OHUfx > > wrote: > > Nobody? > Guess I will use pngs then until I can figure this out. > > > On 14/03/16 3:36 pm, Frank Rueter | OHUfx wrote: >> Hi all, >> >> so I have realised that its not the QLabel but the QPixmap in >> combination to a vector graphic (svg). >> Below is my test code which works fine on osx but crops the >> image on the right hand side when run under windows. >> The svg was saved with a 200 pixel output resolution in the >> header, and when I check the QPixmap's width it does return >> 200, still it crops the image. >> Do I actually have to start using Qt.QSvgRender for something >> simple like this? >> >> Cheers, >> frank >> >> >> from PySide import QtGui >> def pixmapTest(imgPath): >> l = QtGui.QLabel() >> l.setPixmap(QtGui.QPixmap(imgPath)) >> return l >> >> if __name__ == '__main__': >> import sys >> app = QtGui.QApplication([]) >> if sys.platform == 'win32': >> imgPath = 'z:/path/to/svg/image.svg' >> else: >> imgPath = '/server/path/path/to/svg/image.svg' >> l = pixmapTest(imgPath) >> l.show() >> sys.exit(app.exec_()) >> >> On 11/03/16 7:46 pm, Frank Rueter | OHUfx wrote: >>> >>> 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() >>> >>> -- >>> *vfx compositing >>> | *workflow >>> customisation and consulting >>> * * >>> >>> >>> >>> _______________________________________________ >>> PySide mailing list >>> PySide at qt-project.org >>> http://lists.qt-project.org/mailman/listinfo/pyside >> >> -- >> ohufxLogo 50x50 *vfx compositing >> | *workflow >> customisation and consulting >> * * >> >> >> >> _______________________________________________ >> PySide mailing list >> PySide at qt-project.org >> http://lists.qt-project.org/mailman/listinfo/pyside > > -- > ohufxLogo_50x50.png *vfx compositing > | *workflow > customisation and consulting > * * > > > _______________________________________________ > PySide mailing list > PySide at qt-project.org > http://lists.qt-project.org/mailman/listinfo/pyside > > -- ohufxLogo 50x50 *vfx compositing | *workflow customisation and consulting * * -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 27856 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 959 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 28639 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 7528 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 2666 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 2666 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ohufxLogo_50x50.png Type: image/png Size: 2666 bytes Desc: not available URL: From kandraitibold at gmail.com Sat Mar 19 00:19:19 2016 From: kandraitibold at gmail.com (Tibold Kandrai) Date: Sat, 19 Mar 2016 00:19:19 +0100 Subject: [PySide] QLabel crops pixmap In-Reply-To: <56EC7FF4.10507@ohufx.com> References: <56E269E3.8030709@ohufx.com> <56E623C6.6000109@ohufx.com> <56E71651.9070001@ohufx.com> <56EC7FF4.10507@ohufx.com> Message-ID: <007801d1816c$9b2cf180$d186d480$@gmail.com> Hey guys! I use QIcon for SVG rendering, had no issues with it on either platoforms. It does require the icon svg plugins to be loaded. from PySide improt QtGui app = QtGui.Qapplication([]) icon = QtGui.Qicon(’path/to/svg.svg’) pixmap = icon.pixmap(100, 200) # Pixmap size may be smaller, refer to the docs label = QtGui.QLabel() label.setPixmap(pixmap) label.show() Tibold Kandrai Software Architect & Engineer From: PySide [mailto:pyside-bounces+kandraitibold=gmail.com at qt-project.org] On Behalf Of Frank Rueter | OHUfx Sent: Friday, 18 March, 2016 23:24 To: Sean Fisk Cc: PySide Subject: Re: [PySide] QLabel crops pixmap Great, thanks a lot Sean! I have to run now but will take a closer look on the weekend. Cheers, frank On 19/03/16 10:30 am, Sean Fisk wrote: Oops, forgot the attachment! Here you go. On Fri, Mar 18, 2016 at 5:28 PM Sean Fisk > wrote: Hi Frank, I’m mostly seeing similar results. Here is my test program: #!/usr/bin/env python import sys import argparse from PySide import QtGui arg_parser = argparse.ArgumentParser( description='Display an SVG via QPixmap.') arg_parser.add_argument('svg_path', help='SVG file to display') args = arg_parser.parse_args() app = QtGui.QApplication([]) pixmap = QtGui.QPixmap(args.svg_path) label = QtGui.QLabel() label.setPixmap(pixmap) label.show() label.raise_() sys.exit(app.exec_()) OS X Windows The SVG does not display at all under Windows. However, checking the documentation for QPixmap suggests checking QImageReader::supportedImageFormats() for a full list of formats. Doing this yields: #!/usr/bin/env python from __future__ import print_function from PySide import QtGui print(*QtGui.QImageReader.supportedImageFormats(), sep='\n') OS X Windows bmp gif ico jpeg jpg mng pbm pgm png ppm svg svgz tga tif tiff xbm xpm bmp gif ico jpeg jpg mng pbm pgm png ppm tga tif tiff xbm xpm SVG and SVGZ are not on the list for Windows. This indicates to me that Qt will either not display those image types or display them incorrectly. I would personally suggest using QSvgWidget, which utilizes QSvgRenderer but is a lot easier to use. This works for me on both operating systems: #!/usr/bin/env python import sys import argparse from PySide import QtGui, QtSvg arg_parser = argparse.ArgumentParser( description='Display an SVG via QSvgWidget.') arg_parser.add_argument('svg_path', help='SVG file to display') args = arg_parser.parse_args() app = QtGui.QApplication([]) widget = QtSvg.QSvgWidget(args.svg_path) widget.show() widget.raise_() sys.exit(app.exec_()) OS X Windows If you’re like me, it bothers you that Qt does not respect the aspect ratio of the SVG on resize. For that, I created AspectRatioSvgWidget: from __future__ import division class AspectRatioSvgWidget(QtSvg.QSvgWidget): def paintEvent(self, paint_event): painter = QtGui.QPainter(self) default_width, default_height = self.renderer().defaultSize().toTuple() widget_width, widget_height = self.size().toTuple() ratio_x = widget_width / default_width ratio_y = widget_height / default_height if ratio_x < ratio_y: new_width = widget_width new_height = widget_width * default_height / default_width new_left = 0 new_top = (widget_height - new_height) / 2 else: new_width = widget_height * default_width / default_height new_height = widget_height new_left = (widget_width - new_width) / 2 new_top = 0 self.renderer().render( painter, QtCore.QRectF(new_left, new_top, new_width, new_height)) I’ve included a copy of all the sources including the test SVG I used in an attachment. Hope this helps, Frank! Let me know :) ~ Sean Versions of everything: OS X Windows Platform: Darwin-14.5.0-x86_64-i386-64bit Darwin version info: (‘10.10.5’, (‘’, ‘’, ‘’), ‘x86_64’) Python compiler: GCC 4.2.1 Compatible Apple LLVM 7.0.2 (clang-700.1.81) Python version: CPython 2.7.11 Python interpreter architecture: bits=’64bit’ linkage=’’ PySide version: 1.2.4 PySide version tuple: (1, 2, 4, ‘final’, 0) Compiled with Qt: 4.8.7 Running with Qt: 4.8.7 Platform: Windows-8.1-6.3.9600 Windows version info: (‘8.1’, ‘6.3.9600’, ‘’, u’Multiprocessor Free’) Python compiler: MSC v.1500 64 bit (AMD64) Python version: CPython 2.7.11 Python interpreter architecture: bits=’64bit’ linkage=’WindowsPE’ PySide version: 1.2.4 PySide version tuple: (1, 2, 4, ‘final’, 0) Compiled with Qt: 4.8.7 Running with Qt: 4.8.7 #!/usr/bin/env python from __future__ import print_function import platform import argparse import PySide arg_parser = argparse.ArgumentParser( description='Print information about the platform, Python, and PySide.') arg_parser.parse_args() platform_funcs = dict( Windows=platform.win32_ver, Darwin=platform.mac_ver, Linux=platform.linux_distribution, ) system = platform.system() for key, val in [ ('Platform', platform.platform()), ('{} version info'.format(system), platform_funcs[system]()), ('Python compiler', platform.python_compiler()), ('Python version', '{} {}'.format( platform.python_implementation(), platform.python_version())), ('Python interpreter architecture', 'bits={!r} linkage={!r}'.format(*platform.architecture())), ('PySide version', PySide.__version__), ('PySide version tuple', PySide.__version_info__), ('Compiled with Qt', PySide.QtCore.__version__), ('Running with Qt', PySide.QtCore.qVersion()), ]: print('{}: {}'.format(key, val)) ​ -- Sean Fisk On Mon, Mar 14, 2016 at 3:51 PM, Frank Rueter | OHUfx > wrote: Nobody? Guess I will use pngs then until I can figure this out. On 14/03/16 3:36 pm, Frank Rueter | OHUfx wrote: Hi all, so I have realised that its not the QLabel but the QPixmap in combination to a vector graphic (svg). Below is my test code which works fine on osx but crops the image on the right hand side when run under windows. The svg was saved with a 200 pixel output resolution in the header, and when I check the QPixmap's width it does return 200, still it crops the image. Do I actually have to start using Qt.QSvgRender for something simple like this? Cheers, frank from PySide import QtGui def pixmapTest(imgPath): l = QtGui.QLabel() l.setPixmap(QtGui.QPixmap(imgPath)) return l if __name__ == '__main__': import sys app = QtGui.QApplication([]) if sys.platform == 'win32': imgPath = 'z:/path/to/svg/image.svg' else: imgPath = '/server/path/path/to/svg/image.svg' l = pixmapTest(imgPath) l.show() sys.exit(app.exec_()) On 11/03/16 7:46 pm, Frank Rueter | OHUfx wrote: 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() -- vfx compositing | workflow customisation and consulting _______________________________________________ PySide mailing list PySide at qt-project.org http://lists.qt-project.org/mailman/listinfo/pyside -- vfx compositing | workflow customisation and consulting _______________________________________________ PySide mailing list PySide at qt-project.org http://lists.qt-project.org/mailman/listinfo/pyside -- vfx compositing | workflow customisation and consulting _______________________________________________ PySide mailing list PySide at qt-project.org http://lists.qt-project.org/mailman/listinfo/pyside -- vfx compositing | workflow customisation and consulting -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 27856 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.png Type: image/png Size: 959 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image003.png Type: image/png Size: 28639 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image004.png Type: image/png Size: 7528 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image005.png Type: image/png Size: 2666 bytes Desc: not available URL: From frank at ohufx.com Mon Mar 21 06:16:33 2016 From: frank at ohufx.com (Frank Rueter | OHUfx) Date: Mon, 21 Mar 2016 18:16:33 +1300 Subject: [PySide] QLabel crops pixmap In-Reply-To: <007801d1816c$9b2cf180$d186d480$@gmail.com> References: <56E269E3.8030709@ohufx.com> <56E623C6.6000109@ohufx.com> <56E71651.9070001@ohufx.com> <56EC7FF4.10507@ohufx.com> <007801d1816c$9b2cf180$d186d480$@gmail.com> Message-ID: <56EF83B1.1060208@ohufx.com> Thanks Tibold. I need to experiment a little. Outside of my host application (which comes with it's own QT/PySide/svg plugin) your example works fine, but inside the hot app the svg is still cropped. Annoyingly, the same is true for Sean's solution which makes me think it's a bug in the host application. I will send examples to their support and use a png in the meantime. Cheers, frank On 19/03/16 12:19 pm, Tibold Kandrai wrote: > > Hey guys! > > I use QIcon for SVG rendering, had no issues with it on either > platoforms. It does require the icon svg plugins to be loaded. > > from PySide improt QtGui > > app = QtGui.Qapplication([]) > > icon = QtGui.Qicon(’path/to/svg.svg’) > > pixmap = icon.pixmap(100, 200) # Pixmap size may be smaller, refer to > the docs > > label = QtGui.QLabel() > > label.setPixmap(pixmap) > > label.show() > > Tibold Kandrai > > Software Architect & Engineer > > *From:*PySide > [mailto:pyside-bounces+kandraitibold=gmail.com at qt-project.org] *On > Behalf Of *Frank Rueter | OHUfx > *Sent:* Friday, 18 March, 2016 23:24 > *To:* Sean Fisk > *Cc:* PySide > *Subject:* Re: [PySide] QLabel crops pixmap > > Great, thanks a lot Sean! > I have to run now but will take a closer look on the weekend. > > Cheers, > frank > > On 19/03/16 10:30 am, Sean Fisk wrote: > > Oops, forgot the attachment! Here you go. > > On Fri, Mar 18, 2016 at 5:28 PM Sean Fisk > wrote: > > Hi Frank, > > I’m mostly seeing similar results. Here is my test program: > > |/#!/usr/bin/env python/||| > > || > > |*import*||sys| > > |*import*||argparse| > > || > > |*from*||PySide *import* QtGui| > > || > > |arg_parser = argparse.ArgumentParser(| > > | description=||'Display an SVG via QPixmap.'||)| > > |arg_parser.add_argument(||'svg_path'||, help=||'SVG file to display'||)| > > |args = arg_parser.parse_args()| > > || > > |app = QtGui.QApplication([])| > > || > > |pixmap = QtGui.QPixmap(args.svg_path)| > > |label = QtGui.QLabel()| > > |label.setPixmap(pixmap)| > > || > > |label.show()| > > |label.raise_()| > > || > > |sys.exit(app.exec_())| > > *OS X* > > > > *Windows* > > pixmap-osx.png > > > > pixmap-win.png > > The SVG does not display at all under Windows. However, > checking the documentation for |QPixmap| > > suggests checking |QImageReader::supportedImageFormats()| for > a full list of formats. Doing this yields: > > |/#!/usr/bin/env python/||| > > || > > |*from*||__future__ *import* print_function| > > || > > |*from*||PySide *import* QtGui| > > || > > |print(*QtGui.QImageReader.supportedImageFormats(), sep=||'\n'||)| > > *OS X* > > > > *Windows* > > bmp > > gif > > ico > > jpeg > > jpg > > mng > > pbm > > pgm > > png > > ppm > > svg > > svgz > > tga > > tif > > tiff > > xbm > > xpm > > > > bmp > > gif > > ico > > jpeg > > jpg > > mng > > pbm > > pgm > > png > > ppm > > tga > > tif > > tiff > > xbm > > xpm > > SVG and SVGZ are not on the list for Windows. This indicates > to me that Qt will either not display those image types or > display them incorrectly. I would personally suggest using > |QSvgWidget|, which utilizes |QSvgRenderer| but is a lot > easier to use. This works for me on both operating systems: > > |/#!/usr/bin/env python/||| > > || > > |*import*||sys| > > |*import*||argparse| > > || > > |*from*||PySide *import* QtGui, QtSvg| > > || > > |arg_parser = argparse.ArgumentParser(| > > | description=||'Display an SVG via QSvgWidget.'||)| > > |arg_parser.add_argument(||'svg_path'||, help=||'SVG file to display'||)| > > |args = arg_parser.parse_args()| > > || > > |app = QtGui.QApplication([])| > > || > > |widget = QtSvg.QSvgWidget(args.svg_path)| > > || > > |widget.show()| > > |widget.raise_()| > > || > > |sys.exit(app.exec_())| > > *OS X* > > > > *Windows* > > svgwidget-osx.png > > > > svgwidget-win.png > > If you’re like me, it bothers you that Qt does not respect the > aspect ratio of the SVG on resize. For that, I created > |AspectRatioSvgWidget|: > > |*from*||__future__ *import* division| > > || > > |*class*||||*AspectRatioSvgWidget*||(QtSvg.QSvgWidget):| > > |*def* ||*paintEvent*||(self, paint_event):| > > | painter = QtGui.QPainter(self)| > > | default_width, default_height = > self.renderer().defaultSize().toTuple()| > > | widget_width, widget_height = self.size().toTuple()| > > | ratio_x = widget_width / default_width| > > | ratio_y = widget_height / default_height| > > |*if* ratio_x < ratio_y:| > > | new_width = widget_width| > > | new_height = widget_width * default_height / > default_width| > > | new_left = ||0||| > > | new_top = (widget_height - new_height) / ||2||| > > |*else*:| > > | new_width = widget_height * default_width / > default_height| > > | new_height = widget_height| > > | new_left = (widget_width - new_width) / ||2||| > > | new_top = ||0||| > > | self.renderer().render(| > > | painter,| > > | QtCore.QRectF(new_left, new_top, new_width, > new_height))| > > I’ve included a copy of all the sources including the test SVG > I used in an attachment. Hope this helps, Frank! Let me know :) > > ~ Sean > > Versions of everything: > > *OS X* > > > > *Windows* > > Platform: Darwin-14.5.0-x86_64-i386-64bit > > Darwin version info: (‘10.10.5’, (‘’, ‘’, ‘’), ‘x86_64’) > > Python compiler: GCC 4.2.1 Compatible Apple LLVM 7.0.2 > (clang-700.1.81) > > Python version: CPython 2.7.11 > > Python interpreter architecture: bits=’64bit’ linkage=’’ > > PySide version: 1.2.4 > > PySide version tuple: (1, 2, 4, ‘final’, 0) > > Compiled with Qt: 4.8.7 > > Running with Qt: 4.8.7 > > > > Platform: Windows-8.1-6.3.9600 > > Windows version info: (‘8.1’, ‘6.3.9600’, ‘’, u’Multiprocessor > Free’) > > Python compiler: MSC v.1500 64 bit (AMD64) > > Python version: CPython 2.7.11 > > Python interpreter architecture: bits=’64bit’ linkage=’WindowsPE’ > > PySide version: 1.2.4 > > PySide version tuple: (1, 2, 4, ‘final’, 0) > > Compiled with Qt: 4.8.7 > > Running with Qt: 4.8.7 > > |/#!/usr/bin/env python/||| > > || > > |*from*||__future__ *import* print_function| > > |*import*||platform| > > |*import*||argparse| > > || > > |*import*||PySide| > > || > > |arg_parser = argparse.ArgumentParser(| > > | description=||'Print information about the platform, Python, and PySide.'||)| > > |arg_parser.parse_args()| > > || > > |platform_funcs = dict(| > > | Windows=platform.win32_ver,| > > | Darwin=platform.mac_ver,| > > | Linux=platform.linux_distribution,| > > |)| > > |system = platform.system()| > > || > > |*for*||key, val *in* [| > > | (||'Platform'||, platform.platform()),| > > | (||'{} version info'||.format(system), platform_funcs[system]()),| > > | (||'Python compiler'||, platform.python_compiler()),| > > | (||'Python version'||, ||'{} {}'||.format(| > > | platform.python_implementation(), > platform.python_version())),| > > | (||'Python interpreter architecture'||,| > > |||'bits={!r} linkage={!r}'||.format(*platform.architecture())),| > > | (||'PySide version'||, PySide.__version__),| > > | (||'PySide version tuple'||, PySide.__version_info__),| > > | (||'Compiled with Qt'||, PySide.QtCore.__version__),| > > | (||'Running with Qt'||, PySide.QtCore.qVersion()),| > > |]:| > > | print(||'{}: {}'||.format(key, val))| > > ​ > > > -- > > Sean Fisk > > On Mon, Mar 14, 2016 at 3:51 PM, Frank Rueter | OHUfx > > wrote: > > Nobody? > Guess I will use pngs then until I can figure this out. > > On 14/03/16 3:36 pm, Frank Rueter | OHUfx wrote: > > Hi all, > > so I have realised that its not the QLabel but the > QPixmap in combination to a vector graphic (svg). > Below is my test code which works fine on osx but > crops the image on the right hand side when run under > windows. > The svg was saved with a 200 pixel output resolution > in the header, and when I check the QPixmap's width it > does return 200, still it crops the image. > Do I actually have to start using Qt.QSvgRender for > something simple like this? > > Cheers, > frank > > > from PySide import QtGui > def pixmapTest(imgPath): > l = QtGui.QLabel() > l.setPixmap(QtGui.QPixmap(imgPath)) > return l > > if __name__ == '__main__': > import sys > app = QtGui.QApplication([]) > if sys.platform == 'win32': > imgPath = 'z:/path/to/svg/image.svg' > else: > imgPath = '/server/path/path/to/svg/image.svg' > l = pixmapTest(imgPath) > l.show() > sys.exit(app.exec_()) > > On 11/03/16 7:46 pm, Frank Rueter | OHUfx wrote: > > 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() > > -- > > > > > > *vfx compositing > **| > **workflow customisation and consulting > * > > > > _______________________________________________ > > PySide mailing list > > PySide at qt-project.org > > http://lists.qt-project.org/mailman/listinfo/pyside > > -- > > ohufxLogo 50x50 > > > > *vfx compositing > **| > **workflow customisation and consulting > * > > > > _______________________________________________ > > PySide mailing list > > PySide at qt-project.org > > http://lists.qt-project.org/mailman/listinfo/pyside > > -- > > ohufxLogo_50x50.png > > > > *vfx compositing > **| **workflow > customisation and consulting > * > > > _______________________________________________ > PySide mailing list > PySide at qt-project.org > http://lists.qt-project.org/mailman/listinfo/pyside > > -- > > ohufxLogo 50x50 > > > > *vfx compositing **| > **workflow customisation and consulting > * > -- ohufxLogo 50x50 *vfx compositing | *workflow customisation and consulting * * -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 27856 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 959 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 28639 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 7528 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 2666 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ohufxLogo_50x50.png Type: image/png Size: 2666 bytes Desc: not available URL: From matthieu.cadet at gmail.com Thu Mar 10 10:50:53 2016 From: matthieu.cadet at gmail.com (Matthieu Cadet) Date: Thu, 10 Mar 2016 09:50:53 -0000 Subject: [PySide] image file with certain file name won't compile via pyside-rcc In-Reply-To: <56E0F4D5.905@ohufx.com> References: <56E0F4D5.905@ohufx.com> Message-ID: It seems that the problem come from your while block, I get the same bug, but if you put it.next() before .fileInfo(), it works ;) while it.hasNext(): it.next() info = it.fileInfo() According to the Qt documentation "After construction, the iterator is located before the first directory entry. Here's how to iterate over all the entries sequentially:" QDirIterator it("/etc", QDirIterator::Subdirectories); while (it.hasNext()) { qDebug () << it.next(); // /etc/. // /etc/.. // /etc/X11 // /etc/X11/fs // ... } Hope this will works for you too ;) On Thu, Mar 10, 2016 at 5:15 AM, Frank Rueter | OHUfx wrote: > Hi guys, > > I have been seeing this issue for ages now and finally decided to try and > fix it, however, even after writing a tiny little test case I still cannot > get to the bottom of this, so I am hoping you guys can help: > pyside-rc refuses to compile an image file with a certain name and I don't > know why. > Here is the simple test case that reproduces the issue (all required files > are in the attached zip file): > > I have a few icons like this: > ../sandbox/resourceTest/icons/other.svg > ../sandbox/resourceTest/icons/particles.svg > ../sandbox/resourceTest/icons/presets.svg > > I need to compile these icons into a resource module, so I have created a > resource.qrc file on the same level as the "icons" directory which looks > like this: > > > icons/other.svg > icons/particles.svg > icons/presets.svg > > > > I then compile the resource file with this command line: > pyside-rcc -o resources.py resources.qrc > > To test the contents of the resource file I run the following test code > ("qiteratorTest.py" in the zip): > > from PySide import QtCore > import sys > import resources > > it = QtCore.QDirIterator(':/icons',filter=QtCore.QDir.Files, > flags=QtCore.QDirIterator.Subdirectories) > while it.hasNext(): > info = it.fileInfo() > print '{} exists: {}'.format(info.baseName(), info.exists()) > it.next() > > The result is this: > > exists: False > presets exists: True > other exists: True > > No matter what I do, I cannot get pyside to compile the file called > "particles.svg". > To make matters more interesting, I duplicated the same file and renamed > it to the above file names ("other.svg", "particles.svg" and > "presets.svg"). But I still get the same result, so it's clearly not > related to the file itself, but it's name. > > I have been struggling with this problem for ages now. If anybody has any > ideas, I would be very, very grateful! > > Cheers, > frank > > > -- > [image: ohufxLogo 50x50] *vfx compositing > | workflow customisation and > consulting * > > _______________________________________________ > PySide mailing list > PySide at qt-project.org > http://lists.qt-project.org/mailman/listinfo/pyside > > -- Matthieu Cadet Compositor Artist & TD, nWave Digital matthieu.cadet at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ohufxLogo_50x50.png Type: image/png Size: 2666 bytes Desc: not available URL: