[Qt] Improve rpc console history behavior