Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. General talk
  3. Qt 6
  4. PushButton Color Change
Forum Updated to NodeBB v4.3 + New Features

PushButton Color Change

Scheduled Pinned Locked Moved Unsolved Qt 6
2 Posts 2 Posters 290 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
    Mammad
    wrote on last edited by
    #1

    Hi,
    I want to have a push button in Qt C++ that when mouse goes over it, it changes its color and gets back to it's original color when mouse leaves its area,
    First of all, is this even possible?
    If so , any idea how to do that?

    JonBJ 1 Reply Last reply
    0
    • M Mammad

      Hi,
      I want to have a push button in Qt C++ that when mouse goes over it, it changes its color and gets back to it's original color when mouse leaves its area,
      First of all, is this even possible?
      If so , any idea how to do that?

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by
      #2

      @Mammad
      If you want to do it in code use QHoverEvent.
      If you want to do it in stylesheet (no code) use :hover pseudo-state.

      1 Reply Last reply
      3

      • Login

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