문제

Is it possible to make a QRadioButton which looks like a button,and changes it's background when checked? Which property of the class i should refer to?

How to create a menu similar to this one:

menu

Any examples? I'm using QT 4.8

도움이 되었습니까?

해결책

QRadioButton is a QAbstractButton. you can use stylesheet to style it. you can use any of these pseudo states :checked :disabled :enabled :focus :hover :indeterminate :pressed :unchecked

You can also make your own style by inheriting QStyle and latter feed that style to your application.

You can inherit QAbstractButton and check QAbstractButton::setCheckable

Check Out this QML Example

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