Hi,
I would like help about these points
1/ I want to use the append in my method so i can add "Belgique" for ex. to my list but when i do like this nothing happens when i push the button Add....this my code and window new.jpg
#include"scheduletable.h"
#include "ui_scheduletable.h"
#include<QStringListModel>
ScheduleTable
::ScheduleTable(QWidget*parent
): ui(newUi::ScheduleTable)
{
ui->setupUi(this);
QStringListlistePays;
listePays<<"France";
ui->listView->setModel(modele);
connect(ui->addFrame,SIGNAL(clicked()),this,SLOT(add_Frame()));
}
voidScheduleTable::add_Frame()
{
listePays.append("Belgique");
}
ScheduleTable::~ScheduleTable()
{
deleteui;
}
#include"scheduletable.h"
#include "ui_scheduletable.h"
#include<QStringListModel>
ScheduleTable::ScheduleTable(QWidget*parent):
QWidget(parent),
ui(newUi::ScheduleTable)
{
ui->setupUi(this);
QStringListlistePays;
listePays<<"France";
QStringListModel*modele=newQStringListModel(listePays);
ui->listView->setModel(modele);
connect(ui->addFrame,SIGNAL(clicked()),this,SLOT(add_Frame()));
}
voidScheduleTable::add_Frame()
{
listePays.append("Belgique");
}
ScheduleTable::~ScheduleTable()
{
deleteui;
}
To copy to clipboard, switch view to plain text mode
Bookmarks