[PyQt] QFrame with frameShadow set to Plain

Florian Bruhin me at the-compiler.org
Fri Jan 16 21:46:10 GMT 2015


* Pietro Fara <pietro.fara at gmail.com> [2015-01-16 22:32:49 +0100]:
> Hi all, first message from me.
> I'm starting using PyQt5 two months ago and I have some problems with a
> QFrame with frameShadow set to Plain. The PyQt translate it like this:
> [...]
> Look at the arrows: first pyqt sets the frameShadow to Plain and then it
> sets it to Sunken again. Is it a bug or there is a way to fix it?

What exactly do you mean with "The PyQt translate it like this:"? Is
this code you wrote yourself, or code generated by pyuic via Qt

If this is pyuic-generated code, could you also attach the .ui file so
people can look at it and what might have gone wrong?

> self.line = QtWidgets.QFrame(self.scrollAreaWidgetContents)
>         self.line.setGeometry(QtCore.QRect(10, 30, 611, 31))
>         sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum,
> QtWidgets.QSizePolicy.Fixed)
>         sizePolicy.setHorizontalStretch(0)
>         sizePolicy.setVerticalStretch(0)

I suggest attaching code instead of pasting it inline with GMail - it
seems to randomly mess up indentation and newlines sometimes :(


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: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20150116/587addd4/attachment.sig>

More information about the PyQt mailing list