class Qmy_List : public QWidget,
{
Q_OBJECT
public:
Qmy_List (QWidget* = 0);
private:
QMenu *buttonPopupMenu;
QPushButton *pushButton;
...
}
buttonPopupMenu只是在头儿这儿定义了下~是不是就是这儿的问题啊?
我就是想实现一个按钮的弹出菜单~提示下吧!!!
然后在构造函数里就是这个了~
if(!pushButton->menu())
{
qDebug()<<"menu() = 0";
}
//pushButton->setMenu(buttonPopupMenu);
//pushButton->showMenu();