Hi again
I hit the problem with making one class' object available in the entire application.
The object is created every time I try to establish a new connection with db, and after success it is sent to the core class (core - one which controls main UI). By that I have an access to the connection data which I want to have usable many times in different ways.

So I send a pointer to an object(the object itself is created in the UI which is destroyed right after connection being established) and from that moment I have connection data available from the core-level of my application.

Hope that is explained as simple as possible.
Now, I tried to solve this using QSharedPointer, but I think I did not catch an idea which comes with this class.
But before I ask you to help with making this understandable to me, I would like to ask whether there is claver and simpler solution for that.
The class which contains data looks like below
Qt Code:
  1. class ConnectionData : public QObject
  2. {
  3. Q_OBJECT
  4. public:
  5. explicit ConnectionData(QObject *parent = 0);
  6.  
  7. void set(QString u,QString p,QString h,QString c,short int port);
  8. QString getUser() const;
  9. QString getPass() const;
  10. QString getHost() const;
  11. QString getConnectionName() const;
  12. short int getPort() const;
  13.  
  14. private:
  15. QString user,
  16. pass,
  17. host,
  18. connectionName;
  19. short int port;
  20. };
To copy to clipboard, switch view to plain text mode 
so it's not so big, maybe passing by value ?