| Summary: | stand alone qt application not working | ||
|---|---|---|---|
| Product: | Geant4 | Reporter: | ungaro |
| Component: | visualization/OpenGL | Assignee: | John.Allison |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | garnier, laurent.garnier |
| Priority: | P4 | ||
| Version: | 10.3 | ||
| Hardware: | Apple | ||
| OS: | All | ||
| Attachments: |
screenshot1
screenshot 2 |
||
|
Description
ungaro
2017-03-22 14:51:22 CET
Please explain why you need to add QApplication *app = new QApplication(argc, argv); Why not use - or are you also using - G4UIExecutive? Created attachment 447 [details]
screenshot1
s
We are running a custom Qt-interface, thus the need of a QApplication. I'm attaching a couple of screenshots. This is the application website. This is used by several experiments. https://gemc.jlab.org/gemc/html/index.html Laurent assisted us in the past to make sure QtGUI was working properly. Thanks, Created attachment 448 [details]
screenshot 2
To answer the G4UIExecutive question: using it or not using does not affect the problem. See for example exampleB4a.cc. Thanks, Mauri Hi Maurizio, I could reproduce your problem, perhaps a openGL refresh problem in Qt with an external QApp. I'll investigate. Laurent Ok, I think I've got it :
I did a change to prevent extra repaints 6 months ago (10.3 version affected, but not 10.2)
G4OpenGLQtViewer.cc, around line 4643 :
Could you try the following patch:
bool G4OpenGLQtViewer::isCurrentWidget(){
// Add theses lines ==============
G4Qt* interactorManager = G4Qt::getInstance ();
if (!interactorManager->IsExternalApp()) {
// End of added lines ==============
// Prevent from repainting a hidden tab (the current tab name has to be the one of th GL viewer)
if ( GetName() != fUiQt->GetViewerTabWidget()->tabText(fUiQt->GetViewerTabWidget()->currentIndex()).toStdString().c_str()) {
return false;
}
// Add theses lines ==============
}
// End of added line ==============
return true;
}
Laurent
Laurent's patch fixed the problem, thanks! |