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 QToolButton only seems pressed on hover

Checkable QToolButton only seems pressed on hover

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

    This may be pretty basic so apologies first!

    I created a QToolButton and made it checkable. I assigned an icon to it. I expected to get it to look "pressed" when I check it. However it only looks pressed (checked) when I hover the mouse on top of it.

    Here is the code.

    @/* Skip the member definition and setting it to the layout where it is displayed */@
    @btnPause = new QToolButton;@
    @QIcon pauseIcon;@
    @pauseIcon.addFile(QString::fromUtf8(":/Pause.png"), QSize(), QIcon::Normal, QIcon::On);@
    @btnPause->setCheckable(true);@
    @btnPause->setIcon(pauseIcon);@

    Am I missing something?

    "Roads? Where we're going, we don't need roads."

    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