Unsolved Signal doesn't work properly
-
@gabor53 Sorry, I did not explained myself. Review is a Dialog, where do you make this dialog appear?
-
@VRonin
In MainWindow line 75void MainWindow::on_actionAdd_a_Friend_triggered() { Additem *mAddItem = new Additem; mAddItem->exec (); }
-
Now you lost me completely.
typedef Review Additem;
?? I guess not becausevoid Review::on_pushButton_Fix_clicked() { Additem *mAdditem = new Additem(this);
-
@VRonin
Originally, after main.cpp MainWindow.cpp loads. MainWindow has the tableview that displays 4 columns from the database. The user can call Additem.cpp from MainWindow to add more items to the db. After data entry Review.cpp is called where the user can review the data he/she entered. Here there are two choices: either click PushButton_fix to correct errors (this takes back to Additem.cpp) or if all correct you can click Add_to_Db and the item is added to the db. After adding RecAdded signal emitted to add the new record to the tableview in MainWindow. I hope this helps. -
Ok, your design is "borderline". Could you please post additem.h and additem.cpp too please?
-
Thank you for your help.
-
Unrelated to main topic but I just took a glimpse at your code:
QString date = QDate::currentDate().toString (); list = date.split (QRegExp("\\s+")); int size = list.size (); QString sYear = list.at (size-1); yeark = sYear.toInt ();
do you mean?
yeark = QDate::currentDate().year();
-
Yes. I was complicated.
-
Hai....
you just try by this line of code instead of your connect statement
connect(this,&Review::RecAdded,this,&Review::updateTable,Qt::UniqueConnection);
It may help you.. -
Hi @Venkatesh-V
It didnt do the trick. -
No, clearly not. I'm working on the solution, I'll post it shortly. I'm trying to find the time and avoid to correct too much
-
@VRonin
Thank you. I appreciate it. -
@gabor53
When you have time please let me know how can I improve the design. -
Hai..@gabor53
Can you share your whole code? so that i can try to resolve. -
@Venkatesh-V See above
-
@Venkatesh-V Thank you
-
So far whatever I've come up with it opens a second MainWindow.