Get info from terminal
-
Hi,
Shouldn't you rather use the nvidia management library for that task ?
-
Get the line with readLine, make it into a QString and split it then convert it to an integer and there you have it!
-
@BillGR17 If you're really stuck (although it's really not that complicated), I can give you the basic 3-4 lines of code but I believe it's always better to figure things out yourself instead of just copy-pasting code.
-
@BillGR17 Have you even visited the links I gave you? Anyway here are the basic instructions
QProcess nvidia; nvidia.start("nvidia-settings", QStringList()<< "-q" << "gpucoretemp"); nvidia.waitForFinished(); QByteArray output = nvidia.readLine(); int temp = QString(ouput).split(":").last().toInt();
You might have to tweak the code a bit, I just put that together I don't know that it will compile but I don't see why it wouldn't.