Initially hidden control in Qt Creator

Initially hidden control in Qt Creator

Asked on January 8, 2019 in Qt.
Add Comment


  • 1 Answer(s)

    You can try playing round with the Properties (look at setHidden), but it’s much easier to do it in the code.

    So you’d do:

    ui setup code
    ui->groupBox->setHidden(true)
    
    radio button slot
    if true ui->groupBox->setHidden(false)
    else if false ui->groupBox->setHidden(true)
    

    That’s the easiest way really, I’ve never had much luck with adding properties in Designer that Qt already uses

    Answered on February 4, 2019.
    Add Comment


  • Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.