How to remove the codes when delete the widget of the Qt designer?



  • I drag a button and create some slot through "go on slot" with
    the Qt designer and delete the button afterward, but the codes
    generate by designer still there.

    Could I remove the codes and the button together?



  • I tried before but did not succeed, but may be exist solution



  • The designer only does the creation, not the deletion IYAM. I always do it manually. To much automation is sometimes a bad thing. The slot may be called from multiple signals or from code itself. If the designer would do it automatically it could be that you loose a lot of code.
    Greetz



  • Hi,
    Creating the "go to slot" is easy. Designer will add a private slot to your class definition.
    Delete the private definition and the class code and rerun qmake to alter the moc file. That's all.
    btw if you forget the deletion of the private definitions you get a compile error in the moc file!
    Good luck!



  • [quote author="Jeroentje@home" date="1357043743"]Hi,
    Creating the "go to slot" is easy. Designer will add a private slot to your class definition.
    Delete the private definition and the class code and rerun qmake to alter the moc file. That's all.
    btw if you forget the deletion of the private definitions you get a compile error in the moc file!
    Good luck![/quote]

    Perfect... :)

    Thanks & Regards..


Log in to reply
 

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