的Qt工具栏SIGSEGV分段错误
问题描述:
Debug纠错:http://puu.sh/3p8zM.png的Qt工具栏SIGSEGV分段错误
我的工具栏属性:http://puu.sh/3p8Qo.png 我的程序运行良好,直到我打了很多撤销的,现在我得到调试时:(这个SIGSEGV错误
我的代码:
#include "mainwindow.h"
#include "ui_mainwindow.h"
#include "login.h"
#include <QAction>
#include <QWidget>
#include <qaction.h>
mainwindow::mainwindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::mainwindow)
{
rPopulate();
ui->setupUi(this);
}
mainwindow::~mainwindow()
{
delete ui;
}
void mainwindow::rPopulate()
{
button = new QPushButton();
button->setText("Message");
//button->setIconSize(QSize(30,28));
ui->toolBar->addWidget(button);
}
void mainwindow::rNew()
{
}
void mainwindow::rView()
{
}
//ui->_menubar->addMenu(tr("&File"));
答
我有一个SIGSEGV分段错误,因为我之前用户界面 - > setupUi称为rPopulate()(本);
上帝是有趣的。