Could anyoe point to me how to use Tcl_SetMainLoop to setup event loop
procedure for Qt window ?
I have Qt programs and use SWIG to build a Tcl interface. At
the end of main() it is
Tcl_Main(), which handles different event loop than Qt's.
How to combine them together ?
Any examples will be appreciated.
Thanks
-Todd
--Todd
------ BEGIN------
#include <tcl.h>
#include "slider.h"
void qtloop(void)
{
while (1) {
qApp->processEvents();
Tcl_DoOneEvent(TCL_DONT_WAIT);
}
}
//
int main(int argc, char **argv) {
QApplication myApp(argc, argv);
MyMainWindow w;
myApp.setMainWidget(&w);
w.show();
Tcl_SetMainLoop(qtloop);
Tcl_Main(argc, argv, Tcl_AppInit);
return(0);
}
----- END -----------------------------------------------------------