TopoDS_Shape t_topo_box = BRepPrimAPI_MakeBox(1, 1, 1).Shape();
Handle(AIS_Shape) t_ais_box = new AIS_Shape(t_topo_box);
t_ais_box->SetColor(Quantity_NOC_CHOCOLATE);
m_context->Display(t_ais_box,true);
This code runs and displays normally in the MainWindow
MainWindow * a;
a =new MainWindow();
TopoDS_Shape t_topo_box = BRepPrimAPI_MakeBox(1, 1, 1).Shape();
Handle(AIS_Shape) t_ais_box = new AIS_Shape(t_topo_box);
t_ais_box->SetColor(Quantity_NOC_CHOCOLATE);
a->getContext()->Display(t_ais_box,true);
I have defined the MainWindow pointer ain pipeLayout as normal, running this code with no error but no display
Handle(AIS_Shape) t_ais_box = new AIS_Shape(t_topo_box);
t_ais_box->SetColor(Quantity_NOC_CHOCOLATE);
m_context->Display(t_ais_box,true);
This code runs and displays normally in the MainWindow
MainWindow * a;
a =new MainWindow();
TopoDS_Shape t_topo_box = BRepPrimAPI_MakeBox(1, 1, 1).Shape();
Handle(AIS_Shape) t_ais_box = new AIS_Shape(t_topo_box);
t_ais_box->SetColor(Quantity_NOC_CHOCOLATE);
a->getContext()->Display(t_ais_box,true);
I have defined the MainWindow pointer ain pipeLayout as normal, running this code with no error but no display