The Assistant said:
"QSqlDatabase is a value class. Changes made to a database connection via one instance of QSqlDatabase will affect other instances of QSqlDatabase that represent the same connection."

What does it mean by "value class"?
I only have one database connection in my application. Should I use a pointer to it everywhere in the program? Or shouldn't I?

Qt Code:
  1. class MyApp1:public QApplication {
  2.  
  3. public:
  4. QSqlDatabase db() {
  5. return db;
  6. }
  7.  
  8. private:
  9. }
  10.  
  11.  
  12. class MyApp2:public QApplication {
  13.  
  14. public:
  15. QSqlDatabase *db() {
  16. return &db;
  17. }
  18.  
  19. private:
  20. }
To copy to clipboard, switch view to plain text mode 
Which is better? MyApp1 or MyApp2 ?

Thanks !