PDA

View Full Version : Q3PopupMenu - unsupported method issue



Amanda
15th November 2006, 23:00
Hi,

I have successfully ported (yippee :-) with great help from this forum an app from Qt 3 to Qt 4. Have some remaining issues.

In Qt 3, QPopupMenu inherited the following method:
int QMenuData::insertItem ( QWidget * widget, int id = -1, int index = -1 )

I'm using Qt 4's support library for Qt 3 - Q3PopupMenu, however, the above method is unsupported in this class. Any ideas?

My code:

ColorPanel* standardPanel = new ColorPanel(0); # class ColorPanel extends QWidget
Q3PopupMenu* popupMenu = new Q3PopupMenu();

popupMenu->insertItem(standardPanel);


Compiler error:

error: no matching function for call to `Q3PopupMenu::insertItem(tkwidgets::ColorPanel*&)'

Thanks,
Amanda

wysota
19th November 2006, 10:11
I think it's not possible anymore to add widgets to menus. But you could insert that widget to the toolbar instead.