[QtRoot] TQtWidget::Refresh() causes segmentation fault

[quote=“arobicha”] … it works properly (beautifully, as a matter of fact) …[/quote] :smiley:

[quote=“arobicha”]Thanks very much for the info on Qt, and coding practices therein. That actually makes the whole thing worth while, regardless of whether I fix this.
I implemented all the changes you suggested,[/quote]Did you follow my[quote=“fine”]In addition you are recommended to install ( follow to "Complement the existent ROOT installation with QtRoot plugin qtroot.svn.sourceforge.net/viewv … tExamples/ ) which is the collection of HelloWorld-level working QtRoot applications addressing all QtRoot use cases I have encountered.[/quote] to build your application against of that plugin?[quote=“arobicha”]it works properly … on the second execution.[/quote] #-o May I ask you [-o< to try what I recommended to see whether it makes any difference. It should take you 5-10 min to complete.

Also may I ask you to try with your existing system the slightly different version of the MainWindows as follows:[code]#include “MainWindow.h”
#include “ui_MainWindow.h”
#include “TList.h”

MainWindow::MainWindow(QWidget parent) :
QMainWindow(parent),
ui(new Ui::MainWindow),
g()
{
ui->setupUi(this);
Int_t x[5], y[5];
for(int i=0; i<5; i++)
{
x[i] = i; y[i]=i
i;
}
g = new TGraph(sizeof(x)/sizeof(float),x,y);
g->SetBit(kMustCleanup);
TPad *p = ui->widget->GetCanvas();
p->GetListOfPrimitives()->Add(g);
}
MainWindow::~MainWindow()
{ }[/code]to remove the ROOT “rendering” from the widget ctor ( it is redundant anyway. So your application will work faster )
Check this post Compile root with Qt but without dependence on libQtWebKit too