[PyQt] Confused by this class hierachie ...
Anon
anon at nowhere.net
Thu Sep 13 10:37:16 EDT 2001
Hello Pythoneers,
maybe I am showing here a complete lack of understanding how OOP works or
at least how Qt works but I have a serious problem with what follows.
Consider the following structure:
file 'widgets.py'
-----------------
- class myMultiLineEdit(QMultiLineEdit)
o implements a custom context menu, that contains
an item which should open the dialog (see below)
- class widget(QWidget)
o uses myMultiLineEdit
- class mainWidget(QWidget)
o uses widget
- class dialog(QDialog)
o the dialog is modeless (could have been a widget
as well
file 'ui.py'
------------
- imports 'widgets.py'
- class gui(QMainWindow)
o uses widgets.mainWidget
file 'start.py'
---------------
- imports 'ui.py'
- creates an instance of ui.gui()
The actual problem now is, that I have not a clue how the dialog could
operate on the instance created in 'start.py' (My belief is that the dialog
has to know that instance to call its methods).
I would be very grateful, if someone could give me an advice how to go on
with this mess.
Thanks in advance,
Kind regards.
More information about the Python-list
mailing list