Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct


    Qt World Summit: Early-Bird Tickets

    Stylesheet hover and pressed effect problem in custom QAbstractButton

    Mobile and Embedded
    1
    1
    2670
    Loading More Posts
    • 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.
    • S
      SyedOsamaAhmed last edited by

      Hi,

      I am working on Qt for symbian. I have developed custom checkbox which is inherited from QAbstractButton. I want to give hover and pressed effect from stylesheet but its not working.

      below is my style

      @QString styleSheet = QString(
      "QAbstractButton { background:yellow }"
      "QAbstractButton:hover{"
      "background-color: qlineargradient(spread:pad, x1:0, y1:1, x2:0, y2:0, stop:0 rgba(119, 213, 247, 255), stop:1 rgba(0, 120, 174, 255));"
      "}");@

      Please let me know what is wrong with my code?

      Thanks
      Osama

      1 Reply Last reply Reply Quote 0
      • First post
        Last post