Solved, I have another previous 'model'. All works if I change it to modelT.
Myclase
::Myclase(QWidget *parent
) : ui(new Ui::Myclase)
{
ui->setupUi(this);
BuildTable();
}
void Myclase::dir(){
}
Myclase::~Myclase()
{
delete ui;
}
void Myclase::BuildTable () {
ui->tableView.setModel(&modelT);
}
Myclase::Myclase(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::Myclase)
{
ui->setupUi(this);
BuildTable();
}
void Myclase::dir(){
QDirModel model;
}
Myclase::~Myclase()
{
delete ui;
}
void Myclase::BuildTable () {
QStandardItemModel modelT(4, 2);
ui->tableView.setModel(&modelT);
}
To copy to clipboard, switch view to plain text mode
And now I have a new question.... The first 'model' are not private in 'Myclase::dir'
Excuse this basic ask.... and thank you for your time.
Bookmarks