[PyQt] StandardButtonBox: move from QMainWindow to each tab
Rich Shepard
rshepard at appl-ecosys.com
Thu Jan 26 13:49:02 GMT 2017
On Wed, 25 Jan 2017, michael h wrote:
> Depends on what you want the buttons to do, but you can use the
> signal/slots editor to connect these to a common action, or just connect
> to the signals in code.
Michael,
Good point. I need to learn more about working with PyQt5's signals and
slots to know where these standard buttons should be located.
Each tab has three other buttons for adding, modifying, and deleting data
entered in the widgets. When the user finishes with that action I want the
OK and Cancel buttons to accept or reject the changes. I assume that since
each widget on each notebook tab is associated with the appropriate method
to accept or reject the action the standard buttons do not need to be
specific to the tab but to the enclosing layout. Is this correct?
More reading is on my schedule.
> You should not be editing the generated file. That is almost always the
> wrong way to use designer.
I understand that any changes made with the designer will overwrite that
file when it's regenerated, but at some point I'm satisfied with the GUI and
do not plan further modifications.
But, the need (or desire) for change might appear in the future. I still
need to learn how to organize the .py files in a PyQt5 project. The methods
associated with each widget and most menu items will work through psycopg2
to communicate with the postgres back end. I don't know that I can make
those connections using the GUI's signals and slots features.
THanks for your help,
Rich
More information about the PyQt
mailing list