How to redirect stdout to qtconsole output python

Hi.
I use qtcosole in my application and wants to redirect print output of my code to qtconsole .I used QtKernelClient and RichJupyterWidget. Can anyone help me to redirect my sys.stdout to qtconsole output?

Thanks alot