I am writing a Text Editor on Qt Creator. I have a QPlainTextEdit as the central widget, and I want all the font-controlling tools in the main toolbar automatically added to all QMainWindow projects. When I try to drag and drop a QComboBox on to the main toolbar, A not-allowed icon is displayed.
Is there a way of doing this?
Thanks for your help in advance.
You can do what you want by calling the
addWidgetfunction of theQToolBar. So if you have called your main tool barmainToolBaryou can do in the constructor of your main window: