Qt-interest Archive, May 2007
CPU usage
Message 1 in thread
Dear All,
I need a widget in order to show the CPU usage.
Would you please help me?
Thank you in advance.
Navid
---------------------------------
Ahhh...imagining that irresistible "new car" smell?
Check outnew cars at Yahoo! Autos.
Message 2 in thread
> I need a widget in order to show the CPU usage.
>
> Would you please help me?
This is a joke, right?
-------------------------------------
Forty-Three GmbH
Neugrabenweg 5-7
66123 SaarbrÃcken
Fon: +49 (0)681-95814-0
Fax: +49 (0)681-95814-14
HRB 13266 Amtsgericht SaarbrÃcken
GeschÃftsfÃhrer: Dr. Christian Gill
--
[ signature omitted ]
Message 3 in thread
J. Preiss wrote:
>> I need a widget in order to show the CPU usage.
>>
>> Would you please help me?
>>
>
> This is a joke, right?
>
I think you underestimate the power of language barriers.
What exactly is the problem with creating a CPU widget?
What Qt concerns it could be as simple as using a QLabel to display a
percentage of the available cpu, as read out from some system function,
though probably you want to make a graphical view which is a bit more
complex.
I suggest you read up on custom drawn widgets using paintEvent.
/R
--
[ signature omitted ]
Message 4 in thread
> > This is a joke, right?
>
> I think you underestimate the power of language barriers.
Yes I did. Sorry about that.
--
[ signature omitted ]
Message 5 in thread
"Navid Parvini" <parvini_navid@xxxxxxxxx> wrote in message
news:258421.83804.qm@xxxxxxxxxxxxxxxxxxxxxxxxxx
> Dear All,
>
> I need a widget in order to show the CPU usage.
>
> Would you please help me?
Hello Navid,
Since Qt doesn't provide any API to read the CPU usage you would have to
get the data by using native APIs.
Once you have the data in a suitable format, use a widget like
QProgressBar (if you want to display percentage of total CPU load), or a
QTableView (if you want to display the data in a tabular format), or your
own custom widget that displays a graph.
Volker
--
[ signature omitted ]
Message 6 in thread
On Tuesday 08 May 2007, Navid Parvini wrote:
> Dear All,
>
> I need a widget in order to show the CPU usage.
>
> Would you please help me?
>
> Thank you in advance.
> Navid
>
>
> ---------------------------------
> Ahhh...imagining that irresistible "new car" smell?
> Check outnew cars at Yahoo! Autos.
Navid,
If you need a graph widget, take a look at qwt. (Open Source) you can find
them at http://qwt.sourceforge.net It is Qt3 and QT4 compatible and very well
documented.
Kind regards,
--
[ signature omitted ]
Message 7 in thread
Dear Navid Parvini,
best is to use a standard QT widget. e.g. label with % or
a progress bar. If you need a graph you have to draw one.
That is the easy part. More difficult is to find out
what the CPU usage is. That is very OS dependent and you
will find that QT has no solution for you.
I also think we have a 'cultural gap' here.
The way you pose your question is VERY likely to be
interpreted as: "Please design for me a widget which does....."
in the same way as walking up to somebody and say "please give me some money".
I suggest you look at how other people, who do get lots of answers, ask their questions.
-- Gert
--- parvini_navid@xxxxxxxxx wrote:
From: Navid Parvini <parvini_navid@xxxxxxxxx>
To: Qt Group <qt-interest@xxxxxxxxxxxxx>
Subject: CPU usage
Date: Tue, 8 May 2007 03:22:39 -0700 (PDT)
Dear All,
I need a widget in order to show the CPU usage.
Would you please help me?
Thank you in advance.
Navid
---------------------------------
Ahhh...imagining that irresistible "new car" smell?
Check outnew cars at Yahoo! Autos.
--
[ signature omitted ]
Message 8 in thread
Dear All,
I want to get the CPU usage in my code.
Is there any Class in Qt to get it?
I want to get in both Windows and Linux.
Thank you in advance.
Navid
---------------------------------
No need to miss a message. Get email on-the-go
with Yahoo! Mail for Mobile. Get started.
Message 9 in thread
"Navid Parvini" <parvini_navid@xxxxxxxxx> wrote in message
news:423740.85376.qm@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> Dear All,
>
> I want to get the CPU usage in my code.
> Is there any Class in Qt to get it?
> I want to get in both Windows and Linux.
>
> Thank you in advance.
> Navid
As I said before:
"Since Qt doesn't provide any API to read the CPU usage you would have to
get the data by using native APIs."
Volker
--
[ signature omitted ]
Message 10 in thread
Hi,
> I want to get the CPU usage in my code.
> Is there any Class in Qt to get it?
> I want to get in both Windows and Linux.
You had already asked this question on May 8th. There were many answers. What
do you need that you didn't find in the answers?
--
[ signature omitted ]