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. Checkable QActions have both icon and checkbox (they should only have icon)
Forum Updated to NodeBB v4.3 + New Features

Checkable QActions have both icon and checkbox (they should only have icon)

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

    I have a QMenu filled with some QActions, each action has an icon. When I set the action to checkable, the icon is printed over with some kind of dotted pattern, with an apparent checkbox. When I hover over the action, the icon disappears completely, and the checkbox is visible. When I check an action, the icon appears cleanly, but all the other icons still have the check box/icon hybrid look to them.

    Previously, this has worked fine in the system where I had created a QMenu on the spot, constructed QActions there, populated the menu, and associated it with a tool button. I had refactored the menu out as a separate class inheriting from QMenu, and I had refactored the toolbar containing these buttons out of the overall widget as a separate widget. I don't see how either of those steps should induce this behaviour. I've checked that the stylesheets are the same on both widgets and buttons.

    system = Qt5.5, Ubuntu 16.04

    Followup: Previously the QMenu to which these actions belong was constructed without a parent widget. When the QMenu was constructed with the widget being the parent widget, this bad behaviour arose. That should at least help solve some of my problem, to construct menus without parents, but it's still an unexpected result and unclear why it should happen.

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

      Hi,

      Are you using the Qt version provided with Ubuntu ?

      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
      1

      • Login

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