TRint example with Qt

I am trying to run Root from inside Qt.

example:

[code]#include “mainwindow.h”
#include <TROOT.h>
#include <TRint.h>
#include

int main(int argc, char *argv[])
{

TRint *theApp = new TRint("Rint", &argc, argv);
theApp->Run();

//how to do sth likethis: theApp->Execute(“cout “hey””,"");

QApplication a(argc, argv);
MainWindow w;
w.show();

return a.exec();

}
[/code]

The above code runs on Qt, but I cannot find how to pass commands to the TRint.
I want to create TCanvas and hists, but for now even a cout could work.
thanks!

Hi,

Don’t call "theApp->Run();"
See also [url=https://root-forum.cern.ch/t/root-interactive-in-qt/21575/1 answer[/url], and please, don’t post several times for the same issue…

Cheers, Bertrand.