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. Enable/disable toolbar actions by tabpage change
Forum Updated to NodeBB v4.3 + New Features

Enable/disable toolbar actions by tabpage change

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 4.1k 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.
  • A Offline
    A Offline
    abibiano
    wrote on last edited by
    #1

    I have a tabbed interface with a mainwindow and a tabwidget. I have also a maintoolbar.

    I want to disable/enable some buttons on my toolbar depending of the current active tabpage. For example, I want to enable the Save button only on tabpages that has pending changes.

    How can I do it?

    A lot of thanks,

    Alex B.

    1 Reply Last reply
    0
    • V Offline
      V Offline
      vsorokin
      wrote on last edited by
      #2

      Just keep pointers to your Actions in MainWindow class and change Actions state on QTabWidget::currentChanged ( int index ) signal

      --
      Vasiliy

      1 Reply Last reply
      0

      • Login

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