From frank at ohufx.com Tue Apr 4 09:13:44 2017 From: frank at ohufx.com (Frank Rueter | OHUfx) Date: Tue, 4 Apr 2017 19:13:44 +1200 Subject: [PySide] second argument for QLayout.addWidget Message-ID: Hi, I just saw some example code like this: topLayout = QHBoxLayout() topLayout.addWidget(self.pathLabel, 1) What does the second argument to? It doesn't seem to be documented anywhere. Cheers, frank From me at the-compiler.org Tue Apr 4 09:15:59 2017 From: me at the-compiler.org (Florian Bruhin) Date: Tue, 4 Apr 2017 09:15:59 +0200 Subject: [PySide] second argument for QLayout.addWidget In-Reply-To: References: Message-ID: <20170404071558.uhoobt7pjxp3r7ei@hooch> On Tue, Apr 04, 2017 at 07:13:44PM +1200, Frank Rueter | OHUfx wrote: > Hi, > > I just saw some example code like this: > topLayout = QHBoxLayout() > topLayout.addWidget(self.pathLabel, 1) > > What does the second argument to? It doesn't seem to be documented anywhere. It's documented in Qt's docs: http://doc.qt.io/qt-4.8/qboxlayout.html#addWidget 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: 833 bytes Desc: not available URL: From frank at ohufx.com Tue Apr 4 09:18:15 2017 From: frank at ohufx.com (Frank Rueter | OHUfx) Date: Tue, 4 Apr 2017 19:18:15 +1200 Subject: [PySide] second argument for QLayout.addWidget In-Reply-To: <20170404071558.uhoobt7pjxp3r7ei@hooch> References: <20170404071558.uhoobt7pjxp3r7ei@hooch> Message-ID: <812e90e2-ab3a-c3df-c8c0-fd0c2fc1e068@ohufx.com> Aaah, thanks! I looked at the docs for QLayout and QHBoxLayout, but not QBoxLayout :-D On 4/04/17 7:15 PM, Florian Bruhin wrote: > On Tue, Apr 04, 2017 at 07:13:44PM +1200, Frank Rueter | OHUfx wrote: >> Hi, >> >> I just saw some example code like this: >> topLayout = QHBoxLayout() >> topLayout.addWidget(self.pathLabel, 1) >> >> What does the second argument to? It doesn't seem to be documented anywhere. > It's documented in Qt's docs: > http://doc.qt.io/qt-4.8/qboxlayout.html#addWidget > > Florian > From frank at ohufx.com Tue Apr 4 11:54:33 2017 From: frank at ohufx.com (Frank Rueter | OHUfx) Date: Tue, 4 Apr 2017 21:54:33 +1200 Subject: [PySide] QListWidgetItem selection border too large Message-ID: <44188784-f19c-1f7c-d58a-de8deb54192a@ohufx.com> Hi, I have two QListWidgets living in a QSplitter. I need the items to be editable. Some of the item labels are longer than the visible label. When I edit one, it's selection border extends right across the splitter like this: It seems that the selection box is as large as the longest item label in the list. How can I control this so it stays within it's own splitter space? Attached is the sample code. Cheers, frank -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Screen Shot 2017-04-04 at 9.50.55 PM.png Type: image/png Size: 43458 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: FileAnalyserUI.py Type: text/x-python-script Size: 3596 bytes Desc: not available URL: From frank at ohufx.com Thu Apr 6 02:25:22 2017 From: frank at ohufx.com (Frank Rueter | OHUfx) Date: Thu, 6 Apr 2017 12:25:22 +1200 Subject: [PySide] sanity checking my QFileSystemModel approach Message-ID: Hi all, I need to write a simple app that shows two file trees: on the left the one on disk in a given root directory, and on the right the same tree how it will look after certain processing will take place (as a pre-flight check). E.g. I have a source directory like this: source |___.Trashes |___A |___file1.tiff |___file2.tiff |___file3.tiff |___file4.tiff |___B |___file1.jpg |___file2.jpg |___file3.jpg I now want to copy this tree to a different location following certain rules and want a preview before I actually do anything to the files. The rules in this case could be: * ignore all .Trashes folders * zip all tiff files in the same directory. So as a second tree view for the preview I'd like to have a view that would looks like this: source |___A |___file.zip |___B |___file1.jpg |___file2.jpg |___file3.jpg In the original file tree I'd like to colour code the items that will be modified as seen in the second tree view. My question now is: Can I harness QFileSystemModel for this or do I need to write my own tree model to get the functionality I need? I assume I can use QFileSystemModel for the source tree, but not for the preview tree? Is that correct? Any other thoughts on this approach before I back myself into a corner :-D Cheers, frank -------------- next part -------------- An HTML attachment was scrubbed... URL: From frank at ohufx.com Fri Apr 28 10:54:47 2017 From: frank at ohufx.com (Frank Rueter | OHUfx) Date: Fri, 28 Apr 2017 20:54:47 +1200 Subject: [PySide] changing colours for progressbar with GTK style Message-ID: <3ab39245-99d0-ab91-79e2-a740d1f74a4a@ohufx.com> Hi, I have a QProgressBar set to GTK like this: self.pBar = QtGui.QProgressBar() self.pBar.setRange(0, 0) self.pBar.setStyle(QtGui.QStyleFactory.create('GTK')) I like the subtle colour pulsing from dark blue to light blue for a busy bar better than the traveling blocks. However, the default is a little too subtle and I can barely see any pulsing at all: How would I go about setting the colours for a progressbar in GTK style? Thanks, frank -- ohufxLogo 50x50 *vfx compositing | *workflow customisation and consulting * * ** Your gateway to over 1,000 free tools... right inside of Nuke -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Screen Shot 2017-04-28 at 8.54.20 PM.png Type: image/png Size: 5858 bytes Desc: not available URL: From frank at ohufx.com Sat Apr 29 03:48:22 2017 From: frank at ohufx.com (Frank Rueter | OHUfx) Date: Sat, 29 Apr 2017 13:48:22 +1200 Subject: [PySide] [Interest] changing colours for progressbar with GTK style In-Reply-To: References: <3ab39245-99d0-ab91-79e2-a740d1f74a4a@ohufx.com> Message-ID: Thanks Benjamin, so that means this can't be done? Is there style sheet syntax to get the pulsing rather than the traveling blocks? Cheers, frank On 29/04/17 12:09 AM, Benjamin TERRIER wrote: > Hi, > > Normally you would use a QPalette to change the colors. > > However, Qt styles can choose to take the set QPalette into account or > to ignore it. > The last time I checked the GTK style completely ignores it. I cannot > check right know, > but I think it is because it follows the GTK theme of your system. > > BR, > > Benjamin > > 2017-04-28 10:54 GMT+02:00 Frank Rueter | OHUfx >: > > Hi, > > I have a QProgressBar set to GTK like this: > > self.pBar = QtGui.QProgressBar() > self.pBar.setRange(0, 0) > self.pBar.setStyle(QtGui.QStyleFactory.create('GTK')) > > I like the subtle colour pulsing from dark blue to light blue for > a busy bar better than the traveling blocks. > However, the default is a little too subtle and I can barely see > any pulsing at all: > > > How would I go about setting the colours for a progressbar in GTK > style? > > Thanks, > frank > > > -- > > ohufxLogo 50x50 > *vfx compositing | *workflow > customisation and consulting * * > ** > > > > Your gateway to over 1,000 free tools... right inside of Nuke > > > > _______________________________________________ > Interest mailing list > Interest at qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Screen Shot 2017-04-28 at 8.54.20 PM.png Type: image/png Size: 5858 bytes Desc: not available URL: From b.terrier at gmail.com Fri Apr 28 14:15:41 2017 From: b.terrier at gmail.com (Benjamin TERRIER) Date: Fri, 28 Apr 2017 12:15:41 -0000 Subject: [PySide] [Interest] changing colours for progressbar with GTK style In-Reply-To: <3ab39245-99d0-ab91-79e2-a740d1f74a4a@ohufx.com> References: <3ab39245-99d0-ab91-79e2-a740d1f74a4a@ohufx.com> Message-ID: Hi, Normally you would use a QPalette to change the colors. However, Qt styles can choose to take the set QPalette into account or to ignore it. The last time I checked the GTK style completely ignores it. I cannot check right know, but I think it is because it follows the GTK theme of your system. BR, Benjamin 2017-04-28 10:54 GMT+02:00 Frank Rueter | OHUfx : > Hi, > > I have a QProgressBar set to GTK like this: > > self.pBar = QtGui.QProgressBar() > self.pBar.setRange(0, 0) > self.pBar.setStyle(QtGui.QStyleFactory.create('GTK')) > > I like the subtle colour pulsing from dark blue to light blue for a busy > bar better than the traveling blocks. > However, the default is a little too subtle and I can barely see any > pulsing at all: > > > How would I go about setting the colours for a progressbar in GTK style? > > Thanks, > frank > > > -- > > [image: ohufxLogo 50x50] > *vfx compositing | workflow > customisation and consulting * > * * > > > Your gateway to over 1,000 free tools... right inside of Nuke > > > _______________________________________________ > Interest mailing list > Interest at qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Screen Shot 2017-04-28 at 8.54.20 PM.png Type: image/png Size: 5858 bytes Desc: not available URL: