ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
1st
There are some things that I don't understand for the QTimer class for QT. What the method timerId() is used for? It returnes the Id of the timer, but what is that ID.
2nd
And can somebody explain to me how the algorythm goes for the following program: as the timer goes by, in the widget "lineEdit1" to be written the countdown of the timer..example: The timer to be set to go from 1000-10000, and after activating with a pushButton, in the lineEdit1 to write the seconds from 1-10, as the timer goes to the timeout.
1st
There are some things that I don't understand for the QTimer class for QT. What the method timerId() is used for? It returnes the Id of the timer, but what is that ID.
int QTimer::timerId () const
Returns the ID of the timer if the timer is running; otherwise returns -1.
Quote:
2nd:
I don't understand the question, or what you are
trying to achieve.
I understand that it turnes the timer's ID, but what timer ID is?
And what I am trying to achive is:
to create a timer to goes from 0 - 10 000 ms (0-10 sec), and as the timer timesout, in a LineEdit widget the value of the secs to be written, example: countdown from 0 -10
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.