One button on multiple tabs?
-
wrote on 10 Apr 2020, 06:22 last edited by
Hello,
I am using PySide2 and have 5 tabs in my program. I was wondering if it is possible to add a single button on all the tabs?
-
Hello,
I am using PySide2 and have 5 tabs in my program. I was wondering if it is possible to add a single button on all the tabs?
wrote on 10 Apr 2020, 06:48 last edited by JonB 4 Oct 2020, 06:49-
You can place a button, or any widgets, onto each of the tabs. That would be 5 separate copies of the same button, one on each tab. That would be the normal way of doing things.
-
You could have just one copy of the button, and arrange that as each tab becomes active/the current one, the button gets moved onto that tab, if that is what you really mean. But it would be unusual, and I can't imagine why you would want to do it that way.
-
Alternatively, you could have a "shared" area, say below the tabs, where you could place the button.
Other than above, I don't know what you have in mind.
-
-
wrote on 10 Apr 2020, 09:53 last edited by
You can create the class of button with functionality and style and inherit this class so many times and places as you want. For functionality, you can create these buttons dynamically adding and handle signals through the sender().
2/3