Hey,
I want to send my TableView QstandardItemModel from my DialogWindow to my Main Window.
My problem is that the Table View in the mainWindow show me an empty table. I probally do something wrong with the pointers, but I am not sure.
Need Help to send the model or maybe there is another method to send the content of the Dialog Table?
Here is my Code:
Signal - Slot connection in the main window:
Pattern_creator pattern_creator(colorNames);
Pattern_creator pattern_creator(colorNames);
QObject::connect(&pattern_creator, SIGNAL(valueChanged(int,int,QStandardItemModel*)), this, SLOT(PatternCreator(int,int,QStandardItemModel*)));
To copy to clipboard, switch view to plain text mode
The function in the main window:
{
ui->tableView_test->setModel(model_test);
.
.
.
}
void Pattern::PatternCreator(int row, int column, QStandardItemModel *model_test)
{
ui->tableView_test->setModel(model_test);
.
.
.
}
To copy to clipboard, switch view to plain text mode
The call from the Dialog Window:
emit valueChanged(row_pattern, column_pattern, model_pattern_creator);
emit valueChanged(row_pattern, column_pattern, model_pattern_creator);
To copy to clipboard, switch view to plain text mode
The Dialog Header :
public:
signals:
void valueChanged
(int row_pattern,
int column_pattern,
QStandardItemModel *model_pattern_creator
);
public:
QStandardItemModel *model_pattern_creator;
signals:
void valueChanged(int row_pattern,int column_pattern, QStandardItemModel *model_pattern_creator );
To copy to clipboard, switch view to plain text mode
Thanks for help!
Bookmarks