本文整理汇总了C++中QMenuBar::insertAction方法的典型用法代码示例。如果您正苦于以下问题:C++ QMenuBar::insertAction方法的具体用法?C++ QMenuBar::insertAction怎么用?C++ QMenuBar::insertAction使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QMenuBar
的用法示例。
在下文中一共展示了QMenuBar::insertAction方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: QDialog
Lib_dialog::Lib_dialog(const QString lib_path) :
QDialog(NULL),
ui(new Ui::Lib_dialog)
{
ui->setupUi(this);
fx.setPath(lib_path);
QMenuBar *menuBar = new QMenuBar(this);
QAction *action_save= new QAction("save",this);
QAction *action_change= new QAction("change",this);
QAction *action_load= new QAction("load",this);
menuBar->insertAction(NULL,action_save);
menuBar->insertAction(NULL,action_change);
menuBar->insertAction(NULL,action_load);
connect(action_save,SIGNAL( triggered()) ,this,SLOT(save()));
connect(action_load,SIGNAL( triggered()),this,SLOT(open()));
connect(action_change,SIGNAL( triggered()),this,SLOT(changelist()));
connect(ui->widget, SIGNAL(looking(int*,int*)), this, SLOT(looking(int*,int*)));
connect(ui->widget, SIGNAL(setXY(int,int)), this, SLOT(setXY(int,int)));
connect(ui->widget, SIGNAL(addPoint()), this, SLOT(addPoint()));
connect(ui->MaxX,SIGNAL(textChanged ()),this,SLOT(setMaxX()));
connect(ui->MinX,SIGNAL(textChanged ()),this,SLOT(setMinX()));
connect(ui->MinY,SIGNAL(textChanged ()),this,SLOT(setMinY()));
connect(ui->MaxY,SIGNAL(textChanged ()),this,SLOT(setMaxY()));
connect(ui->LX,SIGNAL(textChanged ()),this,SLOT(setX()));
connect(ui->LY,SIGNAL(textChanged ()),this,SLOT(setY()));
connect(ui->gridX,SIGNAL(textChanged ()),this,SLOT(setgridX()));
connect(ui->gridY,SIGNAL(textChanged ()),this,SLOT(setgridY()));
connect(ui->widget,SIGNAL(drw ()),this,SLOT( draw ()));
connect(ui->widget,SIGNAL(del ()),this,SLOT( del ()));
connect(ui->widget,SIGNAL(correct ()),this,SLOT( correct ()));
connect(ui->widget,SIGNAL(save ()),this,SLOT( save ()));
connect(ui->widget,SIGNAL(open ()),this,SLOT( open ()));
connect(ui->widget,SIGNAL(changegrid()),this,SLOT( changegrid()));
connect(ui->widget,SIGNAL(change(int,int)),this,SLOT(change(int,int)));
//-------------------------------------------------------------------------------------------
// в lib_path я передам адрес библиотеки(папки с файлами). Сохрани его сам кудато))) //
//--------------------------------------------------------------------------------------------
}