Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. [Solved] Clicking QPushButtons with icons inside
Forum Updated to NodeBB v4.3 + New Features

[Solved] Clicking QPushButtons with icons inside

Scheduled Pinned Locked Moved QML and Qt Quick
2 Posts 2 Posters 2.8k 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.
  • E Offline
    E Offline
    Endless
    wrote on last edited by
    #1

    A normal QPushButton changes appearance when you click it. It's different with QPushButtons that have the pixmap property - only the area that isn't taken up by the image changes appearance.

    Unfortunately the images in my QPushButtons are as big as the button itself, so when it's clicked, it accepts the click, but there's no change in appearance to indicate that it was clicked. Any ideas on how to get around this?

    1 Reply Last reply
    0
    • EddyE Offline
      EddyE Offline
      Eddy
      wrote on last edited by
      #2

      Did you have a look at "stylesheets":http://doc.qt.nokia.com/4.8-snapshot/stylesheet-examples.html#customizing-qpushbutton?

      It is possible to make the appearance different depending on the clicked state using stylesheets.

      Edit : Here is a "similar thread":http://developer.qt.nokia.com/forums/viewthread/867
      You could find similar topics yourself using the tag system on the right of your screen. ;)

      Qt Certified Specialist
      www.edalsolutions.be

      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