void MainWindow::on_pushButtonNovoInvestimento_clicked()
{
pushButtonAdicionarLancamentoInvestimento->setText("Adicionar lançamento");
modeloLancamentosInvestimento->setHeaderData(0, Qt::Horizontal, "Valor");
modeloLancamentosInvestimento->setHeaderData(1,Qt::Horizontal, "Ações");
tableViewLancamentosInvestimento->setModel(modeloLancamentosInvestimento);
connect(pushButtonAdicionarLancamentoInvestimento, SIGNAL(clicked()), mapper, SLOT(map()));
mapper->setMapping(pushButtonAdicionarLancamentoInvestimento, modeloLancamentosInvestimento);
connect(mapper,
SIGNAL(mapped
(QObject*)),
this,
SLOT(on_pushButtonAdicionarLancamentoInvestimento_clicked
(QObject*)));
}
void MainWindow
::on_pushButtonAdicionarLancamentoInvestimento_clicked(QObject *modeloLancamentosInvestimento
) {
}
void MainWindow::on_pushButtonNovoInvestimento_clicked()
{
QPushButton *pushButtonAdicionarLancamentoInvestimento = new QPushButton;
pushButtonAdicionarLancamentoInvestimento->setText("Adicionar lançamento");
QTableView *tableViewLancamentosInvestimento = new QTableView;
QStandardItemModel *modeloLancamentosInvestimento = new QStandardItemModel(0, 2, this);
modeloLancamentosInvestimento->setHeaderData(0, Qt::Horizontal, "Valor");
modeloLancamentosInvestimento->setHeaderData(1,Qt::Horizontal, "Ações");
tableViewLancamentosInvestimento->setModel(modeloLancamentosInvestimento);
QSignalMapper *mapper = new QSignalMapper;
connect(pushButtonAdicionarLancamentoInvestimento, SIGNAL(clicked()), mapper, SLOT(map()));
mapper->setMapping(pushButtonAdicionarLancamentoInvestimento, modeloLancamentosInvestimento);
connect(mapper, SIGNAL(mapped(QObject*)), this, SLOT(on_pushButtonAdicionarLancamentoInvestimento_clicked(QObject*)));
}
void MainWindow::on_pushButtonAdicionarLancamentoInvestimento_clicked(QObject *modeloLancamentosInvestimento)
{
QStandardItemModel *modelo = modeloLancamentosInvestimento;
}
To copy to clipboard, switch view to plain text mode
Bookmarks