Originally Posted by
tbscope
For problem 1: It's obvious the program will crash at timer->isActive since timer is an uninitialised pointer (as far as I understand your description).
hello,
The Timer is already initialized and started in Class1. and works fine i.e. it times out and class the slot peridiocically. but if i try to stop or check if it is Active from Class2 it doesnt work. But yes it is not initialized in Class2.
What is it you want to do? Do you want to get information of class 1 in class 2?
Yes.. note, the Timer is defined in the base class that is inherited in both Class1 and 2.
{
progress->setWindowTitle(title);
progress->setLabelText(text);
progress->setRange(0,100);
progress->setAutoClose(true);
progress->setAutoReset(true);
progress->show();
}
void SysClass::ProgDlg(QString title, QString text)
{
progress = new QProgressDialog(0, Qt::Dialog);
progress->setWindowTitle(title);
progress->setLabelText(text);
progress->setRange(0,100);
progress->setAutoClose(true);
progress->setAutoReset(true);
progress->show();
QCoreApplication::processEvents();
}
To copy to clipboard, switch view to plain text mode
and i call it every 3 seconds.
SysClass tmp;
SysClass.ProgDlg("Hello","Wait")
SysClass tmp;
SysClass.ProgDlg("Hello","Wait")
To copy to clipboard, switch view to plain text mode
the progress bas appears but the string Wait appears only in the first call only..
Thanks
Bookmarks