I have a TCanvas in a QT application which I update by a QT timer event. When the user closes the TCanvas window, I get a segfault from the timer event as the the TCanvas no longer exists.
I now want to use the Closed()-signal from the TCanvas to stop my QT timer. Therefore I need to connect somehow the Root signal to the QT slot.
I can’t use the QT connect method as this expects a QObject, and when I use the Root connect method the the slot in my QT class is not recognized: Error in TQObject::CheckConnectArgs: slot stopGraph() does not exist
Any help for that would be highly appreciated, thanks!
Since TQtWidget is the the regular QWidget (QWidget subclass ) one can use it as such. In addition TQtWidget is in possession of the few customs Qt signals and slots. Check root.cern.ch/root/html532/TQtWidget.html
So the communication you are speaking about should no be a problem. You can find a lot of HelloWord-level examples from the Qt-distribution (see qtroot.svn.sourceforge.net/viewv … tExamples/ )
However, for some rare cases the TQtWidget /QWidget signals / slots do not suffice. For such case one can use so-called QtRootSlot
Check this: