Ignore:
Timestamp:
Nov 29, 2007, 5:13:27 PM (17 years ago)
Author:
garnier
Message:

corrections de bugs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/geant4/visualization/OpenGL/src/G4OpenGLQtViewer.cc

    r617 r624  
    171171    bool found = false;
    172172#if QT_VERSION < 0x040000
    173     QWidgetList  *list = QApplication::allWidgets();
    174     QWidgetListIt it( *list );         // iterate over the widgets
    175     QWidget * widget;
    176     while ( (widget=it.current()) != 0 ) {  // for each widget...
    177       ++it;
    178       if ((found== false) && (widget->inherits("QMainWindow"))) {
    179 #ifdef GEANT4_QT_DEBUG
    180         printf("G4OpenGLQtViewer::CreateMainWindow case Qapp exist\n");
    181 #endif
    182         GLWindow = new QDialog(widget,0,FALSE,Qt::WStyle_Title | Qt::WStyle_SysMenu | Qt::WStyle_MinMax );
    183         found = true;
    184       }
    185     }
    186     delete list;                      // delete the list, not the widgets
    187 #else
    188     foreach (QWidget *widget, QApplication::allWidgets()) {
    189       if ((found== false) && (widget->inherits("QMainWindow"))) {
    190 #ifdef GEANT4_QT_DEBUG
    191         printf("G4OpenGLQtViewer::CreateMainWindow case Qapp exist\n");
    192 #endif
    193         GLWindow = new QDialog(widget,Qt::WindowTitleHint | Qt::WindowSystemMenuHint | Qt::WindowMinMaxButtonsHint);
    194         found = true;
    195       }
    196     }
     173    //    QWidgetList  *list = QApplication::allWidgets();
     174    //    QWidgetListIt it( *list );         // iterate over the widgets
     175    //    QWidget * widget;
     176    //    while ( (widget=it.current()) != 0 ) {  // for each widget...
     177    //      ++it;
     178    //      if ((found== false) && (widget->inherits("QMainWindow"))) {
     179    GLWindow = new QDialog(0,0,FALSE,Qt::WStyle_Title | Qt::WStyle_SysMenu | Qt::WStyle_MinMax );
     180    //        found = true;
     181    //      }
     182    //    }
     183    //    delete list;                      // delete the list, not the widgets
     184#else
     185    //    foreach (QWidget *widget, QApplication::allWidgets()) {
     186    //      if ((found== false) && (widget->inherits("QMainWindow"))) {
     187    GLWindow = new QDialog(0,Qt::WindowTitleHint | Qt::WindowSystemMenuHint | Qt::WindowMinMaxButtonsHint);
     188    //        found = true;
     189    //      }
     190    //    }
    197191#endif
    198192
Note: See TracChangeset for help on using the changeset viewer.