How to have a user enter a name for a radio button



  • Hello,

    New to QT! I am wanting to have a user enter a name in a configuration tab that is used to name a radio button.
    Example would be you have 10 radio buttons. These radio button will allow a user to select an item to change information.
    I want the user to declare the name of each radio button in a configuration tab. The name of each button is sent to the main radio display tab.
    Is this possible? How can I do it?

    Cheers,
    Jim


  • Moderators

    @JNorth Yes, it is possible. Use QLineEdit to enter a string (name for a radio button). If user finishes entering the text use the text from this QLineEdit and set it in QRadioButton (see http://doc.qt.io/qt-5.8/qabstractbutton.html#text-prop).


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.