Hey Everyone
I have successfully created a frontend to a database application. In my View Form App, I have 4 buttons, First Prev Next Last. Each of these buttons runs about 200 lines of the same code. This seems very inefficient to me. Can anyone give me some suggestions to make it more efficient?

I would like to have when a user clicks one of the buttons, 5 functions/slots called. The first slot would clear the form, then run the QSqlQuery, then choose which record to encapsulate, next populate the form with the values from the query, then Enable/Disable the 4 navigation buttons. The connectors currently look like this:

Qt Code:
  1. //First Push Button Clicked
  2. connect(ui.firstPB, SIGNAL(clicked()), this, SLOT(clearTextDateFields()));
  3. connect(ui.firstPB, SIGNAL(clicked()), this, SLOT(pieceQuerySlot()));
  4. connect(ui.firstPB, SIGNAL(clicked()), this, SLOT(firstPBSlot()));
  5. connect(ui.firstPB, SIGNAL(clicked()), this, SLOT(setFormValues()));
  6. connect(ui.firstPB, SIGNAL(clicked()), this, SLOT(navPBCheck()));
To copy to clipboard, switch view to plain text mode 

I guess what I am asking, is how do I pass the query value from one slot to another?



Thanks in advance, let me know if I am clear as mud

fnmblot