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. QMenu single select

QMenu single select

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 3 Posters 666 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.
  • D Offline
    D Offline
    diniamo
    wrote on last edited by
    #1

    I'm trying to make a QMenu where you can only select one QAction.
    It's for a tray menu.

    I was only able to find on post, but that was in Python.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      If it's using PyQt or PySide it should be translatable in C++.

      That said, can you explain your use case ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • D Offline
        D Offline
        diniamo
        wrote on last edited by
        #3

        Here is the python issue: https://stackoverflow.com/questions/48447053/one-qaction-checkable-at-time-in-qmenu
        I think it explains it pretty well.

        1 Reply Last reply
        0
        • M Offline
          M Offline
          mchinand
          wrote on last edited by
          #4

          See this example where a QActionGroup is created that makes only one alignment action selectable at a time.

          1 Reply Last reply
          1
          • D Offline
            D Offline
            diniamo
            wrote on last edited by
            #5

            Thank you!
            I don't know why I couldn't find this on my own...

            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