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



  • 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


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.