Martin
Martin

Reputation: 4862

Is there a switch like gui element other than radio buttons in Qt

I am looking for a switch like gui element in Qt. It actually exists when using QML but I would like to stay away from QML with the project in concern. I simply need to switch between two alternatives so radio buttons are not very appropriate. The gui should look like this (not exactly but to make it more clear)

 [A o--|    B] 

 [A    |--o B]

Upvotes: 1

Views: 1235

Answers (1)

Gombat
Gombat

Reputation: 2084

You could use a QSlider, setting it's minimum value to 0, it's maximum value to 1 and the steps to one, such that only two values are possible.

Upvotes: 4

Related Questions