Extend QConnection class with context manager API