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
Qt Code:
  1. #include"scheduletable.h"
  2.  
  3. #include "ui_scheduletable.h"
  4. #include<QStringListModel>
  5. ScheduleTable::ScheduleTable(QWidget*parent):
  6. QWidget(parent),
  7. ui(newUi::ScheduleTable)
  8. {
  9. ui->setupUi(this);
  10. QStringListlistePays;
  11. listePays<<"France";
  12. QStringListModel*modele=newQStringListModel(listePays);
  13. ui->listView->setModel(modele);
  14. connect(ui->addFrame,SIGNAL(clicked()),this,SLOT(add_Frame()));
  15. }
  16. voidScheduleTable::add_Frame()
  17. {
  18. listePays.append("Belgique");
  19.  
  20. }
  21. ScheduleTable::~ScheduleTable()
  22. {
  23. deleteui;
  24. }
To copy to clipboard, switch view to plain text mode