Help on PyQt5 !!
Michael Torrie
torriem at gmail.com
Thu Jan 30 10:44:10 EST 2020
On 1/30/20 4:38 AM, Souvik Dutta wrote:
> Hey guys. I might be asking the most childish question. I have a window in
> pyqt5 (a file in python). Let's call it win1.
> I have another pyqt5 (another file in python). Let's call it win2. Now win2
> is called when add button in win1 is clicked. So far no problem. But win2
> has another button called save. When this is called I want a label to
> appear in win1. How can I do this?? And how can I have a number of labels
> like this when a certain condition is fulfilled?? Thank you in advance for
> your help.
There are some additional resources you might consider using, and will
likely get faster responses with regards to Qt questions. First is the
PyQt5 mailing list.
https://www.riverbankcomputing.com/mailman/listinfo/pyqt . Also there
are the normal Qt forums: https://forum.qt.io/
As to your question, you can add a label to a window the same way you
would add the label in the first place. Likely you'll want a QBoxLayout
widget to place the label(s) into, with the addWidget() method. Take a
look at the Qt docs for signal, methods, etc.
https://doc.qt.io/qt-5/qboxlayout.html . For the most part, PyQt5's
method calls, signals, and slots, are the same in Python as they are in C++.
More information about the Python-list
mailing list