문제

I'm checking out libqxt (an extension library for Qt) and cannot change the text color of a QxTLabel; it's driving me nuts.

QxTLabel extends QFrame. QFrame doesn't know anything about text. I tried changing the palette via the Form Editor but that didn't appear to do anything either.

I also tried to change the style sheet but, again, QFrame doesn't know about text and QxTLabel isn't giving anything up either.

Nothing is jumping out at me from the full member list for QxTLabel either. Thoughts?

도움이 되었습니까?

해결책

Well, that was harder to find than I expected but I eventually got it:

ui.myQxTLabel->setStyleSheet( "QFrame { color: white }" );

Previously, I was trying to set foreground-color.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top