How to use qcomboBox current Text with in Qprocess Function
-
Hi,
How to use qcomboBox current Text with in Qprocess Function .I have already set specific time zone (Asia / Kolkata),
QProcess Dateprocess (this);
Dateprocess.start("sh",QStringList()<<"-c"<<"sudo timedatectl set-timezone Asia / Kolkata");
if (!Dateprocess.waitForStarted())
{
qDebug() << "Error : " << Dateprocess.errorString();
}
Dateprocess.waitForFinished(-1);
int systemHwClockStatus = system("sudo hwclock -w");and,
I made the timezone list but , i want to set system Time and Date Using TimeZone.
How to use the current text of the combo Box given above.I don't know how to do it.QProcess Dateprocess (this);
Dateprocess.start("sh",QStringList()<<"-c"<<"sudo timedatectl set-timezone ");
if (!Dateprocess.waitForStarted())
{
qDebug() << "Error : " << Dateprocess.errorString();
}
Dateprocess.waitForFinished(-1);
int systemHwClockStatus = system("sudo hwclock -w");Thank you,
-
@Ramkumar-Mohan
Don't know what you mean. Running aQProcess
has nothing to do with aQComboBox
. As you know, you get the current text of aQComboBox
viacurrentText()
. If you are saying you want to use that it in a command-line to pass toQProcess
then do so.