Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Border color of Qt components

Tags:

colors

qt

qframe

I want to change border color of QFrame component. Also tried with style sheet but no effect at run time. In my project there are various Dialog UI are there which are basically QFrame and i want to change the border color of selected dialog i.e. QFrame border color. Is there any workaround for that in QT. As shown below there are two dialog when any one of selected it's respective frame border color should get changed

Here is the snippet of which something i want to do

like image 763
foxt7ot Avatar asked Jul 11 '14 11:07

foxt7ot


1 Answers

Try this:

frame->setObjectName("myObject");
frame->setStyleSheet("#myObject { border: 5px solid black; }");
like image 130
Leo Chapiro Avatar answered Sep 18 '22 00:09

Leo Chapiro