Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. One button on multiple tabs?
Forum Updated to NodeBB v4.3 + New Features

One button on multiple tabs?

Scheduled Pinned Locked Moved Unsolved Qt for Python
3 Posts 3 Posters 934 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    lolcocks
    wrote on 10 Apr 2020, 06:22 last edited by
    #1

    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?

    J 1 Reply Last reply 10 Apr 2020, 06:48
    0
    • L lolcocks
      10 Apr 2020, 06:22

      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?

      J Offline
      J Offline
      JonB
      wrote on 10 Apr 2020, 06:48 last edited by JonB 4 Oct 2020, 06:49
      #2

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

      1 Reply Last reply
      0
      • V Offline
        V Offline
        Volodymyr14
        wrote on 10 Apr 2020, 09:53 last edited by
        #3

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

        PyQt/PySide

        1 Reply Last reply
        0

        1/3

        10 Apr 2020, 06:22

        • Login

        • Login or register to search.
        1 out of 3
        • First post
          1/3
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved