Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. [solved] Android: QPushButton - turning into plain, clickable text?
Forum Update on Monday, May 27th 2025

[solved] Android: QPushButton - turning into plain, clickable text?

Scheduled Pinned Locked Moved Mobile and Embedded
1 Posts 1 Posters 1.4k 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.
  • E Offline
    E Offline
    evocat
    wrote on 11 Aug 2014, 16:31 last edited by
    #1

    Hi,
    I've been trying to turn QPushButton to look like a plain text, which can be clicked. But, unlike I thought, it's not so easy on Android...

    Firstly,
    @button->setFlat(true);@

    seems to do the trick, BUT if the button gets clicked, its normal background flashes behind the button - not exactly what I want.

    Then I tried:
    @button->setStyleSheet("background-color: transparent;");@

    It works perfectly on Windows, but on Android, button turns completely into black - so even the text on it cannot be seen! (Is this possibly a bug..?)

    Ok, well, then another shot:
    @ button->setStyleSheet("background-color: rgba( 255, 255, 255, 0% );");@

    which again seems to work fine on windows, but on Android, if I move my finger over that button, gray, transparent box appears around that button?!

    Any ideas?

    edit:
    Ok, solved by myself by creating desired button from QLabel.
    Like this: http://qt-project.org/wiki/Make-a-QLabel-Clickable

    1 Reply Last reply
    0

    1/1

    11 Aug 2014, 16:31

    • Login

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