SamuelNLP
SamuelNLP

Reputation: 4136

control the border of the frame and its components

I have a frame in qt qith some components in it. When I change the stylesheet the components in it also change, but i don't want this, as i'm changing only the border of the frame.

border-width: 1px; 
border-style: inset; 
border-color: #515c84
border-radius: 9px;

Also the border gets two colors and i don't know why.

Can anyone help me please?

Upvotes: 0

Views: 922

Answers (1)

york.beta
york.beta

Reputation: 1827

The children widgets inherit the parent frame stylesheet. If you want to change the view of the frame only, use this stylesheet:

#frameObjectName {
    border: 1px solid #515c84;
    border-radius: 9px;
}

Where frameObjectName is the name of the frame.

The border gets two colors, because it's inset style. Use solid border style to get one color border line.

Upvotes: 1

Related Questions