Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to remove the codes when delete the widget of the Qt designer?
QtWS25 Last Chance

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

Scheduled Pinned Locked Moved General and Desktop
5 Posts 4 Posters 4.9k Views
  • 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 Offline
    S Offline
    stereomatching
    wrote on last edited by
    #1

    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
    0
    • M Offline
      M Offline
      MuhamedAuda
      wrote on last edited by
      #2

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

      1 Reply Last reply
      0
      • JeroentjehomeJ Offline
        JeroentjehomeJ Offline
        Jeroentjehome
        wrote on last edited by
        #3

        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
        0
        • JeroentjehomeJ Offline
          JeroentjehomeJ Offline
          Jeroentjehome
          wrote on last edited by
          #4

          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
          0
          • M Offline
            M Offline
            Macro
            wrote on last edited by
            #5

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

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved