innocent boy
innocent boy

Reputation: 315

How to delete the item in Qt promote selection

This is the promoted widgets form

Actually I have two choices but the upper one (haha.h) is does not exist, and I can't find the way to delete it. I am beginner in Qt, so someone can help me?

Upvotes: 4

Views: 2083

Answers (2)

Avner
Avner

Reputation: 69

Very simple:

  1. Select hana: The '-' sign on bottom-right will become RED.
  2. Press on the RED '-'.

Good luck

Upvotes: 6

mohabouje
mohabouje

Reputation: 4050

You can remove it manually, just open the MainWindow.ui with an editor and remove the xml entry of your promoted class. You will find something like this:

<customwidget>
   <class>haha</class>
   <extends>QLabel</extends>
   <header>haha.h</header>
   <container>0</container>
</customwidget>

Check the counter, if it higher than 0, then you have to demote all the promoted widgets. Another way its to try to promote a simple QWidget an then remove it from the Qt Creator menu,

Upvotes: 2

Related Questions