Creating empty TabWidget (without any tabs)
How can I create a QTabWidget (which is promoted to a custom widget) that has no tabs at all so I can add them in code later? I have a custom Widget TabWidget that is derived from QTabWidget and I have promoted the QTabWidget in question to such a TabWidget. In the TabWidget constructor I add a single tab. Right now this results in three tabs in the end because designer adds two tabs of its own, that I want to get rid of. I can delete one of them in designer but at least one tab is always present and can not be deleted. Of course I could delete the tab in code but I don't like to have such an ugly workaround.
Thanx in advance
Re: Creating empty TabWidget (without any tabs)
I guess promoting TabWidget in Designer as plain QWidget as its base class would do the trick. Of course, it won't look like a tab widget in Designer but no default tabs get added either.
Re: Creating empty TabWidget (without any tabs)
I think it is possible to hack the ui file and delete the part of the xml code responsible for those tabs. I don't know how will Designer behave if you try to load such file into it, though.