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 do I stop moc file adding deleted action
Forum Updated to NodeBB v4.3 + New Features

How do I stop moc file adding deleted action

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 685 Views 1 Watching
  • 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.
  • T Offline
    T Offline
    tony67
    wrote on last edited by
    #1

    Hi All,
    I got rid of an action in qtcreator by deleting it in the mainwindow.ui action editor. However it remained in the moc file producing an error
    moc_mainwindow.cpp:178: error: undefined reference to `MainWindow::on_actionOptions_2_triggered()'
    from the line

            case 10: _t->on_actionOptions_2_triggered(); break;
    

    So I just deleted the line. This worked fine. However I've found if I do a full rebuild all, the line pops back up in the moc.
    How can I safely and permanently remove the action_2. I'm very confused.

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @tony67 said:

      on_actionOptions_2_triggered()

      Hi this looks like a leftover slot?
      Is this still in mainwindow.h ? ( under slots)

      1 Reply Last reply
      2

      • Login

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