Qt3 used to provide QMenuBar::insertItem with QWidget* parameter. This way any custom widget could be added to menu bar - for example a clock-widget.
In Qt4 there is no such overloaded method. What would be the best way to reach the same goal - adding custom widgets to a menu bar? The custom widgets should be integrated in the layout of menu bar.
Does anyoune knows the background, why this overload of insertItem was removed in Qt4 API?
Best regards.
解决方案
Sorry Javier for short comments. Every time I intended to break a line, the comment was submitted :-(
I tried this code in a project created with QtCreator:
class MyWidgetAction : public QWidgetAction
{
public:
MyWidgetAction( QObject * parent ) :QWidgetAction ( parent )
{
}
void releaseWidget ( QWidget * widget )
{<