Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Manually deleted widget from Uİ now new ones does not work



  • Hello, I have put a a checkbox in the UI then deleted it from UI and from header. Now I want to place a new checkbox I put it in the UI and create slot for it:

    void MainWindow::on_checkBox_3_stateChanged(int arg1)
    {
        if(ui->checkBox_3->isChecked()){
    
            qDebug()<<"Pressed.";
        }
    }
    

    It never enters to if statement. I believe I broke something up while I was trying to remove the previous checkbox. How can I fix it any suggestions?


  • Lifetime Qt Champion

    @GunkutA Looks like you're using the auto-connect feature.
    Did you try to connect manually to see whether that works?
    Also, did you do a complete clean rebuild?



  • Hello, after I manually connect it now both of them works. Thank you.


Log in to reply