Changeset 1318 for trunk


Ignore:
Timestamp:
Jun 18, 2010, 3:24:55 PM (14 years ago)
Author:
garnier
Message:

fix qt3 bug

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/interfaces/basic/src/G4UIQt.cc

    r1314 r1318  
    157157
    158158#ifdef G4DEBUG_INTERFACES_BASIC
    159   printf("G4UIQt::Initialise after main window creation +++++++++++ %d\n");
     159  printf("G4UIQt::Initialise after main window creation +++++++++++\n");
    160160#endif
    161161
     
    310310
    311311  // Set not visible until session start
     312#if QT_VERSION >= 0x040000
     313 #if QT_VERSION >= 0x040200
    312314  fMainWindow->setVisible(false);
     315 #else
     316  fMainWindow->hide();
     317 #endif
     318#else
     319  fMainWindow->hide();
     320#endif
    313321
    314322#ifdef G4DEBUG_INTERFACES_BASIC
     
    647655  fTabWidget->setTabSelected(false);
    648656
     657#if QT_VERSION >= 0x040000
     658 #if QT_VERSION >= 0x040200
    649659  fTabWidget->setVisible(true);
     660 #else
     661  fTabWidget->show();
     662 #endif
     663#else
     664  fTabWidget->show();
     665#endif
    650666
    651667  // This will send a paintEvent to OGL Viewers
     
    667683 */
    668684void G4UIQt::ResizeTabWidget( QResizeEvent* e) {
    669   for (int a=0;a<fTabWidget->count() ;a++) {
     685  for (G4int a=0;a<fTabWidget->count() ;a++) {
    670686#ifdef G4DEBUG_INTERFACES_BASIC
    671687    printf("G4UIQt::ResizeTabWidget +++++++++++++++++++++++++++++++++++++++\n");
     
    696712  if (fEmptyViewerTabLabel != NULL) {
    697713    if (fTabWidget->isVisible()) {
     714#if QT_VERSION >= 0x040000
     715  #if QT_VERSION >= 0x040200
    698716      fEmptyViewerTabLabel->setVisible(false);
     717  #else
     718      fEmptyViewerTabLabel->hide();
     719  #endif
     720#else
     721      fEmptyViewerTabLabel->hide();
     722#endif
    699723    } else {
     724#if QT_VERSION >= 0x040000
     725  #if QT_VERSION >= 0x040200
    700726      fEmptyViewerTabLabel->setVisible(true);
    701     }
    702   }
    703 
    704   fMainWindow->setVisible(true);
     727  #else
     728      fEmptyViewerTabLabel->show();
     729  #endif
     730#else
     731      fEmptyViewerTabLabel->show();
     732#endif
     733    }
     734  }
     735
     736#if QT_VERSION >= 0x040000
     737  #if QT_VERSION >= 0x040200
     738      fMainWindow->setVisible(true);
     739  #else
     740      fMainWindow->show();
     741  #endif
     742#else
     743      fMainWindow->show();
     744#endif
    705745  // get the size of the tabbar
    706746  int tabBarX;
     
    20992139    fEmptyViewerTabLabel->show();
    21002140    fTabWidget->setParent(0);
    2101     fTabWidget->setVisible(false);
     2141#if QT_VERSION >= 0x040000
     2142  #if QT_VERSION >= 0x040200
     2143      fTabWidget->setVisible(false);
     2144  #else
     2145      fMainWindow->hide();
     2146  #endif
     2147#else
     2148      fMainWindow->hide();
     2149#endif
    21022150    delete fTabWidget;
    21032151    fTabWidget = NULL;
Note: See TracChangeset for help on using the changeset viewer.