Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void Dialog::on_buttonBox_accepted()my first attempt so I could get the result n Mainwindow.cpp but it could be incorrect
- {
- Cities.clear();
- for(int row = 0; row<ui->tableWidget->rowCount(); row++)
- {
- cities s(get_city(row),get_time(row,3),get_time(row,4));
- Cities.push_back(s);
- }
- }
- void Dialog::on_pushButton_clicked()// my attempt to make another button but I could not get a result in Mainwindow.cpp but could check correctly
- {
- if(cities_is_filled())
- {
- Cities.clear();
- for(int row = 0; row<ui->tableWidget->rowCount(); row++)
- {
- cities s(get_city(row),get_time(row,3),get_time(row,4));
- Cities.push_back(s);
- }
- }
- }
- //GET RESULT
- void MainWindow::on_actionAdd_train_triggered()
- {
- Dialog e;
- if(e.exec())
- {
- for(auto City: e.Cities)
- {
- ui->textBrowser->append(City.city_+ " " + City.depart_+ " " +City.leave_);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement