[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: Re: [PyQt] RuntimeError: super-class __init__() of type WbGitMainWindow was never called?
From: Barry Scott <barry () barrys-emacs ! org>
Date: 2016-05-31 10:13:45
Message-ID: 86F65460-A3D9-4E67-9BF4-09D19A6D7C80 () barrys-emacs ! org
[Download RAW message or body]
> On 31 May 2016, at 10:47, Florian Bruhin <me@the-compiler.org> wrote:
>
> * Barry Scott <barry@barrys-emacs.org> [2016-05-31 10:40:19 +0100]:
>> Here is a simplified example that shows a bizare error.
>> I am on Fedora 23 with python 3.4.3 PyQt 5.5.1 Qt 5.6 as packaged by Fedora.
>>
>> $ cat qqq.py
>> from PyQt5 import QtWidgets
>>
>> import sys
>>
>> qapp = QtWidgets.QApplication( sys.argv )
>>
>> class WbMainWindow(QtWidgets.QMainWindow):
>> def __init__( self ):
>> print( 'WbMainWindow.__init__' )
>> super().__init__( self )
>
> Here you're passing self as a parent argument to QMainWindow.__init__,
> so you're trying to set the not yet fully-initialized object as a
> parent of itself.
>
> You probably want either "super().__init__()" or
> "QtWidgets.QMainWindow.__init__(self)" here.
Doh! Thank you.
Barry
_______________________________________________
PyQt mailing list PyQt@riverbankcomputing.com
https://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