Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Qt Academy Launch in California!

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

    General and Desktop
    4
    5
    4566
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      stereomatching last edited by

      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?

      1 Reply Last reply Reply Quote 0
      • M
        MuhamedAuda last edited by

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

        1 Reply Last reply Reply Quote 0
        • Jeroentjehome
          Jeroentjehome last edited by

          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

          Greetz, Jeroen

          1 Reply Last reply Reply Quote 0
          • Jeroentjehome
            Jeroentjehome last edited by

            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!

            Greetz, Jeroen

            1 Reply Last reply Reply Quote 0
            • M
              Macro last edited by

              [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..

              1 Reply Last reply Reply Quote 0
              • First post
                Last post