⚠️ Forum Maintenance: Feb 6th, 8am - 14pm (UTC+2)

Dynamically changing images with options QButtonGroup (QRadioButton)

  • Hello, I'm trying to change an image automatically as soon as the user makes a choice in two QButtonGroup of QRadioButton, a group has two options and the other has four options, so I intend to show eight different images depending on the options, how can I capture what group button was captured, associate it with the button of the other group and in real time to change the image? Is there any example like that?
    How to change a picture I know, I used QLabel and the method setPixmap() for that, what I lack is to know how to capture the signs of these QButtonGroup and automatically change the image.
    I hope I've been accurate in my description. Thank you for attention.

  • @Pedro_Monteiro You'd need to write a slot that listens to one of the signals in http://doc.qt.io/qt-5/qbuttongroup.html#signals - choose whichever is best suited to the details of the rest of your code

Log in to reply