Ok guys I found my silly mistake. I was setting style sheet in paintEvent function. Sorry to waste your time. Thank you.