gornvix
gornvix

Reputation: 3384

"Ui" file not updating when a QAction widget is removed in the GUI

I have deleted an action in the Qt Creator GUI, but it still appears in the "ui" file:

<action name="actionFoo">
 <property name="text">
  <string>Foo</string>
 </property>
</action>

Do I have to remove it from the file too? Or is there a way to rebuild the file?

Upvotes: 0

Views: 504

Answers (1)

Martin Hennings
Martin Hennings

Reputation: 16866

Removing an action from a menu doesn't delete that action. You need to delete it yourself.

In Qt Designer there is an Action Editor (in menu View) where you can delete any action from the context menu.

In Qt Creator it can be found in Window -> Views -> Action Editor (that's a guess! I'm using the german version.)

At last, you can always edit your .ui file manually (sometimes neccessary if Qt Creator isn't flexible enough). You can't do that from Qt Creator, but with any external text editor. Just make sure to delete the complete XML node and don't create invalid XML...

Upvotes: 2

Related Questions