[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: Re: [PyQt] Styling an QMdiArea widget
From: Sarah Mount <mount.sarah () gmail ! com>
Date: 2011-04-18 6:02:05
Message-ID: BANLkTimd3YLnZM-gLJRMCUi0OcJewKavZQ () mail ! gmail ! com
[Download RAW message or body]
On Mon, Apr 18, 2011 at 01:14, David Boddie <david@boddie.org.uk> wrote:
> On Sun Apr 17 19:48:16 BST 2011, Sarah Mount wrote:
>
>> Thanks, you and David were both right, the error was an incorrect path
>> for the JPG. However, what I was after was to have one image appear in
>> the background, and not to have the image tiled. This is possible
>> using a style sheet, but I'm not sure a) if it's possible using a
>> brush (your code comes out with the image tiled) or b) whether it's
>> possible to use a style sheet, as my code for that didn't work!
>
> I think the answers are:
>
> a) You can't really use a brush for this because it only supports
> tiled textures.
> b) QMdiArea doesn't support style sheets:
> http://doc.qt.nokia.com/4.7/stylesheet-reference.html
>
> However, I looked at qtconfig, one of the tools shipped with Qt, and it
> seems that there's a trick you can use if you are able to create a QMdiArea
> subclass and use that instead of a regular QMdiArea widget:
>
> http://www.diotavelli.net/PyQtWiki/Adding_a_background_image_to_an_MDI_area
>
Thanks, that looks like just the thing!
Sarah
--
Sarah Mount, Senior Lecturer, University of Wolverhampton
website: http://www.snim2.org/
twitter: @snim2
_______________________________________________
PyQt mailing list PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic