View Full Version : Push Button selection color
in_dbasu
18th June 2012, 13:49
Hi All
When i click on my push button a red rectangle is displayed on top of the button. How to remove that color
Regards
wysota
18th June 2012, 14:35
Give more info please.
in_dbasu
19th June 2012, 05:58
Hi
I attached the screen shot of widget. In 1st column 2nd button you can see a red rectangle on top of the button which i clicked
All the pushbutton are custom made.
Regards
aamer4yu
19th June 2012, 06:19
If its custom made button, you should track its paintEvent. Or are stylesheets used ?
in_dbasu
19th June 2012, 07:44
Hi
I Only used style sheets.
Regards
wysota
19th June 2012, 09:54
So correct the stylesheet to not show that border.
in_dbasu
19th June 2012, 10:11
Hi
this is my code
MyPushButton::MyPushButton(QWidget *parent) : QPushButton(parent)
{
MyPushButton::setFixedSize(115, 115);
MyPushButton::setStyleSheet ("background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,stop: 0 #649600, stop: 0.9 #000000); border:none; border-radius: 20px;color: #964600;");
QFont f("Arial", 14);
MyPushButton::setFont(f);
}
aamer4yu
19th June 2012, 10:25
There must be another place where you are setting stylesheet... probably on hover or focus case.
in_dbasu
19th June 2012, 11:13
Hi
I am not using both hover or focus case but still i guess internally hover or focus function is getting called.
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.