Friday, July 4th 2008, 9:39pm UTC+1

You are not logged in.

  • Login
  • Register

Dear visitor, welcome to QtForum.org. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Wednesday, May 7th 2008, 2:56pm

Extending QTimer to pass parameters

i'm very new to Qt and C++, however i find myself using both at the moment.

essentially i want to use QTimer to execute a method with a parameter int. i understand that natively you cannot execute methods with parameters. however, i was wondering if this is possible if i extended QTimer. if so does anyone had an example of the proper way to set this up.

thank you
  • Go to the top of the page

2

Wednesday, May 7th 2008, 7:07pm

RE: Extending QTimer to pass parameters

virtual void timerEvent ( QTimerEvent * event ). You can use the event param. Create an event. pass that event in then process the event. You can extend the Qtimer class but not necessary.
  • Go to the top of the page

Rate this thread