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. Compilation errors after deleting/editing UI widgets. Tried everything

Compilation errors after deleting/editing UI widgets. Tried everything

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 3 Posters 363 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.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #1

    First of all, I tried everything that helped others with the same problem. Deleting the build directory, cleaning the build and running qmake, disabling Shadow-Builds, and so on.. But the moc_mainwindow.cpp doesn't cease to contain references to non-existent widgets.

    the one I deleted:

    C:\Users\sophie\Documents\Bestellungen\debug\moc_mainwindow.cpp:112: Fehler: undefined reference to `MainWindow::on_checkBox_toggled(bool)'
    

    the one I renamed:

    C:\Users\sophie\Documents\Bestellungen\debug\moc_mainwindow.cpp:113: Fehler: undefined reference to `MainWindow::on_pushButton_clicked()'
    

    any idea? :(

    jsulmJ J.HilkJ 2 Replies Last reply
    0
    • ? A Former User

      First of all, I tried everything that helped others with the same problem. Deleting the build directory, cleaning the build and running qmake, disabling Shadow-Builds, and so on.. But the moc_mainwindow.cpp doesn't cease to contain references to non-existent widgets.

      the one I deleted:

      C:\Users\sophie\Documents\Bestellungen\debug\moc_mainwindow.cpp:112: Fehler: undefined reference to `MainWindow::on_checkBox_toggled(bool)'
      

      the one I renamed:

      C:\Users\sophie\Documents\Bestellungen\debug\moc_mainwindow.cpp:113: Fehler: undefined reference to `MainWindow::on_pushButton_clicked()'
      

      any idea? :(

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @SnuggleKat Do you maybe still have connections for these slots somewhere?

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      ? 1 Reply Last reply
      3
      • ? A Former User

        First of all, I tried everything that helped others with the same problem. Deleting the build directory, cleaning the build and running qmake, disabling Shadow-Builds, and so on.. But the moc_mainwindow.cpp doesn't cease to contain references to non-existent widgets.

        the one I deleted:

        C:\Users\sophie\Documents\Bestellungen\debug\moc_mainwindow.cpp:112: Fehler: undefined reference to `MainWindow::on_checkBox_toggled(bool)'
        

        the one I renamed:

        C:\Users\sophie\Documents\Bestellungen\debug\moc_mainwindow.cpp:113: Fehler: undefined reference to `MainWindow::on_pushButton_clicked()'
        

        any idea? :(

        J.HilkJ Offline
        J.HilkJ Offline
        J.Hilk
        Moderators
        wrote on last edited by
        #3

        hi @SnuggleKat

        please do not rely on the automatic connect by name method that Qt and QtDesigner provide.
        That will and does, like you just now detected, break very easily.

        I recommend connecting all your signals to slots by hand, and using the new Qt5 Syntax
        https://wiki.qt.io/New_Signal_Slot_Syntax

        delete your build folder and rerun qmake, it will fix your issue.


        Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


        Q: What's that?
        A: It's blue light.
        Q: What does it do?
        A: It turns blue.

        1 Reply Last reply
        3
        • jsulmJ jsulm

          @SnuggleKat Do you maybe still have connections for these slots somewhere?

          ? Offline
          ? Offline
          A Former User
          wrote on last edited by
          #4

          @jsulm @J-Hilk
          Yes I had.. I have totally forgotten to remove the slots from my header file (feels ashamed).
          thanks for the reminder :)

          jsulmJ 1 Reply Last reply
          1
          • ? A Former User

            @jsulm @J-Hilk
            Yes I had.. I have totally forgotten to remove the slots from my header file (feels ashamed).
            thanks for the reminder :)

            jsulmJ Offline
            jsulmJ Offline
            jsulm
            Lifetime Qt Champion
            wrote on last edited by
            #5

            @SnuggleKat No problem, happens sometimes :-)

            https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            1

            • Login

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