Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Access QTimer from diffrent Multiple class
praveen0991kr last edited by
I am trying to access timer function of one class(Dialog) from another class(Menu) and trying to start and stop timer.
I have One class Dialog and Another Class Menu.
And defined a QTimer in Dialog
public: MenuWindow *myMenuWindow, *Menuclose;
and I am try to use this timer from another class but i am not able to access
//IN DIALOG.CPP I HAVE DEFINED THE FUNCTION BELOW
and to call ScreenLck() function from Dialog;
//Defined in Menu header file class;
void MenuWindow::OpenScreenWindow() //--1
but the time is not start whether it hangs the Application
Suggest any thing , I will be thankful;
brcontainer last edited by
If I did what you asked, but I'll try:
Maybe you can create a "SLOT" in its class "Dialog" and call:
@connect(QTDiagLck, SIGNAL(timeout()), QTDiagLck, SLOT(cutomSlot()));@
Or if you want to access the variable maybe you can create a "getter".