Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Do something when a particular tab is selected
Forum Updated to NodeBB v4.3 + New Features

Do something when a particular tab is selected

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 271 Views
  • 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.
  • B Offline
    B Offline
    BigBen
    wrote on last edited by
    #1

    I have a tab widget, with 2 tabs. The second tab has a label. I want to display a movie in that label only when that tab is clicked and becomes active.

    Is there something I can use to check if that tab is active or not?

    1 Reply Last reply
    0
    • C Offline
      C Offline
      ChrisW67
      wrote on last edited by
      #2

      In a slot connected to QTabWidget::currentChanged(), if the new current index is the one of interest then start playback. If it is not the index of interest then stop playback.

      1 Reply Last reply
      4

      • Login

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