Alternatively you could try
1. QMenu <http://doc.qt.nokia.com/latest/qmenu.html> *menu = new QMenu<http://doc.qt.nokia.com/latest/qmenu.html> (this); 2. menu->addAction("Testaaaaaaaaaaaaaaaaaaaaa"); 3. menu->addAction("Test1"); 4. menu->addAction("Test2"); 5. 6. pushButton->setMenu(menu); On Fri, Dec 2, 2011 at 9:47 PM, David Moulder <[email protected]>wrote: > I'm not at python console to test this but from memory you need to set the > contextMenu property and then hook up the signal to slot to show your menu. > > Qt::ContextMenuPolicy<http://doc.qt.nokia.com/latest/qt.html#ContextMenuPolicy-enum> > > > and > > > customContextMenuRequested<http://doc.qt.nokia.com/latest/qwidget.html#customContextMenuRequested> > > > Good luck. > > -Dave > > On Fri, Dec 2, 2011 at 9:13 PM, notanymike <[email protected]> wrote: > >> How can one make a drop-down command menu appear when right-clicking >> on a button in a Maya window using pyqt? >> >> -- >> view archives: http://groups.google.com/group/python_inside_maya >> change your subscription settings: >> http://groups.google.com/group/python_inside_maya/subscribe >> > > > > -- > David Moulder > http://www.google.com/profiles/squish3d > -- David Moulder http://www.google.com/profiles/squish3d -- view archives: http://groups.google.com/group/python_inside_maya change your subscription settings: http://groups.google.com/group/python_inside_maya/subscribe
