Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove selection around QPushButton text

When i add QPushButton on my form, i get this:

enter image description here

You can see ugly text selection (into the button). How can i remove it?
Here is my CSS of this button:

    enterButton->setStyleSheet("QPushButton { \
                                    padding: 6px; \
                                    background: #369; \
                                    color: white; \
                                    font-size: 13px;\
                                    border: 0; \
                                    border-radius: 3px; \
                                }\
                                QPushButton:hover { \
                                    background: #47a; \
                                }\
                                QPushButton:pressed { \
                                    background: #58b; \
                                }");

Thanks!

like image 726
Efog Avatar asked Nov 19 '14 21:11

Efog


1 Answers

I don't have Ubuntu installed right now but I think outline: 0px should work:

enterButton->setStyleSheet("QPushButton { \
                                padding: 6px; \
                                background: #369; \
                                color: white; \
                                font-size: 13px;\
                                border: 0; \
                                border-radius: 3px; \
                                outline: 0px; \
                            }\
                            QPushButton:hover { \
                                background: #47a; \
                            }\
                            QPushButton:pressed { \
                                background: #58b; \
                            }");

Try it and come back with a feedback.

like image 103
Iuliu Avatar answered Sep 17 '22 01:09

Iuliu