Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Redirect QProcess::execute() output to /dev/null
I am trying to run a command to set a date
QString currentDate = "date -s "tomorrow""
#if defined (linux) || defined(FreeBSD)
int isDateSet= QProcess::execute(currentDate);
This writes the output to console.However i wish to redirect the output to /dev/null.
In linux command line , I can provide as follows
date -s "tomorrow" > /dev/null
But how do I do the same with QProcess::execute()
Thanks in advance
Pablo J. Rogina last edited by
Thank you Christian. Will try the same
Thanks for the link Pablo, Will certainly take a look at it .