Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

One button on multiple 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?



  • @lolcocks

    • 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.



  • 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().


Log in to reply