Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to delete the item in Qt promote selection

Tags:

qt

qwidget

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?

like image 795
innocent boy Avatar asked Nov 07 '25 21:11

innocent boy


2 Answers

Very simple:

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

Good luck

like image 76
Avner Avatar answered Nov 12 '25 11:11

Avner


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,

like image 21
mohabouje Avatar answered Nov 12 '25 09:11

mohabouje



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!