[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: Re: Little inconvenience in uic of PyQt6
From: Phil Thompson <phil () riverbankcomputing ! com>
Date: 2023-01-13 15:21:26
Message-ID: 7325ea8ce8c91b91453e71e73a838cc8 () riverbankcomputing ! com
[Download RAW message or body]
On 16/12/2022 16:51, Detlev Offenbach wrote:
> Hi Phil,
>
> when I use uic.loadUI() in some code to load a Qt form file (*.ui),
> which includes a custom widget derived from QWidget but with a
> different __init__() signature, loading fails.
>
> Example:
> QWidget: QWidget.__init__(parent=None)
> myWidget: myWidget.__init__(somePath="", parent=None)
>
> In this case uic assigns the containing parent (e.g. a QDialog) to the
> first argument somePath. This leads to an exception eventually. This
> could be prevented if the "setupObject()" method in uiparser.py (line
> 218) create the object with a call like (see line 226)
>
> obj = self.factory.createQObject(clsname, name, args, is_attribute,
> parent=parent)
>
> Would a change like this be possible?
Done, although not a trivial change.
Phil
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic