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. How to remove checkbox when using qmenu's setCheckable option
Forum Updated to NodeBB v4.3 + New Features

How to remove checkbox when using qmenu's setCheckable option

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 3 Posters 577 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.
  • I Offline
    I Offline
    IknowQT
    wrote on last edited by
    #1

    e9a0a6ff-d224-46ff-9fe5-79b2d971e8d4-image.png

    Is there a way to get rid of the checkbox in the multi-selection menu?

    Or is it possible that I want to draw a new checkbox?
    Can I use paint overriding in Qaction?

    Christian EhrlicherC 1 Reply Last reply
    0
    • I IknowQT

      e9a0a6ff-d224-46ff-9fe5-79b2d971e8d4-image.png

      Is there a way to get rid of the checkbox in the multi-selection menu?

      Or is it possible that I want to draw a new checkbox?
      Can I use paint overriding in Qaction?

      Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @IknowQT said in How to remove checkbox when using qmenu's setCheckable option:

      Can I use paint overriding in Qaction?

      As already said more than once - QAction is no QWidget, you can't override it.

      No, afaik you can't remove the checkbox when using QSS. Don't make it checkable and remember the check state by yourself somewhere else.

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

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

        Hi,

        Out curiosity, why do you want to remove that piece of information from your UI ?

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

        I 1 Reply Last reply
        0
        • SGaistS SGaist

          Hi,

          Out curiosity, why do you want to remove that piece of information from your UI ?

          I Offline
          I Offline
          IknowQT
          wrote on last edited by
          #4

          @SGaist said in How to remove checkbox when using qmenu's setCheckable option:

          궁금해서 UI에서 해당 정보를 제거하려는 이유는 무엇입니까?

          Since the background can be changed in the check-in state without a check box, the check box does not grow, so I thought of it in a different way.

          The size of the checkbox is too small to be seen in the field of view.
          For that reason, I tried to remove the checkbox from the ui and change the button background color depending on the check state to make it easier to see at a glance.

          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