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. Hide icon I had previously given to a QPushButton
QtWS25 Last Chance

Hide icon I had previously given to a QPushButton

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 2.6k 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.
  • M Offline
    M Offline
    marlenet15
    wrote on 28 Oct 2015, 18:55 last edited by
    #1

    I am creating a virtual keyboard and it works. Within the keyboard I created a button where if you click it, it will take you the number/symbols keyboard. When that button is clicked, the caps lock button, which is an icon, it will turn into an apostrophe symbol. However, the icon doesn't hide/disappear and it is next to the apostrophe. Is there any way to hide the icon temporarily?

    1 Reply Last reply
    0
    • C Offline
      C Offline
      Chris Kawa
      Lifetime Qt Champion
      wrote on 28 Oct 2015, 19:02 last edited by Chris Kawa
      #2

      You can't hide it temporarily but you can just remove it by setting a null icon (button->setIcon(QIcon())) and switch it back when you need to.

      Also, if that's an option for you, you can switch to QToolButton which has a toolButtonStyle property that you can set to show text, icon or both.

      1 Reply Last reply
      0

      2/2

      28 Oct 2015, 19:02

      • Login

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