Changeset 1329 for trunk/source/interfaces/basic/src
- Timestamp:
- Jul 28, 2010, 4:57:46 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/interfaces/basic/src/G4UIQt.cc
r1325 r1329 506 506 ) 507 507 { 508 bool shouldConnect = false; 509 508 510 #ifdef G4DEBUG_INTERFACES_BASIC 509 511 printf("G4UIQt::AddTabWidget %d %d\n",sizeX, sizeY); … … 535 537 fTabWidget->setSizePolicy(policy); 536 538 537 #if QT_VERSION >= 0x040500 538 connect(fTabWidget, SIGNAL(tabCloseRequested(int)), this, SLOT(TabCloseCallback(int))); 539 #endif 540 connect(fTabWidget, SIGNAL(currentChanged ( int ) ), SLOT(UpdateTabWidget(int))); 539 shouldConnect = true; 541 540 } 542 541 … … 584 583 printf("G4UIQt::AddTabWidget ADD %d %d + %d %d---------------------------------------------------\n",sizeX, sizeY,sizeX-fTabWidget->width(),sizeY-fTabWidget->height()); 585 584 #endif 586 585 587 586 if (fMainWindow->isVisible()) { 588 587 … … 591 590 int tabBarY = 0; 592 591 if (fTabWidget->count() >0) { 592 #ifdef G4DEBUG_INTERFACES_BASIC 593 printf("G4UIQt::AddTabWidget -1-1-1\n"); 594 #endif 595 593 596 #if QT_VERSION < 0x040000 594 597 tabBarX = fTabWidget->width()-fTabWidget->page(0)->width(); … … 600 603 } 601 604 605 #ifdef G4DEBUG_INTERFACES_BASIC 606 printf("G4UIQt::AddTabWidget 00000\n"); 607 #endif 608 602 609 fMainWindow->resize(tabBarX+fMainWindow->width()+sizeX-fTabWidget->width(),tabBarY+fMainWindow->height()+sizeY-fTabWidget->height()); 603 610 } 604 611 612 #ifdef G4DEBUG_INTERFACES_BASIC 613 printf("G4UIQt::AddTabWidget 1111111\n"); 614 #endif 605 615 // Problems with resize. The widgets are not realy drawn at this step, 606 616 // then we have to force them on order to check the size … … 612 622 #endif 613 623 624 #ifdef G4DEBUG_INTERFACES_BASIC 625 printf("G4UIQt::AddTabWidget 222222\n"); 626 #endif 614 627 #if QT_VERSION < 0x040000 615 628 fTabWidget->setCurrentPage(fTabWidget->count()-1); … … 618 631 #endif 619 632 633 #ifdef G4DEBUG_INTERFACES_BASIC 634 printf("G4UIQt::AddTabWidget 333333\n"); 635 #endif 620 636 // Set visible 621 637 #if QT_VERSION >= 0x040000 … … 629 645 #endif 630 646 647 #ifdef G4DEBUG_INTERFACES_BASIC 648 printf("G4UIQt::AddTabWidget -------\n"); 649 #endif 650 if (shouldConnect) { 651 #if QT_VERSION >= 0x040500 652 connect(fTabWidget, SIGNAL(tabCloseRequested(int)), this, SLOT(TabCloseCallback(int))); 653 #endif 654 connect(fTabWidget, SIGNAL(currentChanged ( int ) ), SLOT(UpdateTabWidget(int))); 655 } 631 656 return true; 632 657 }
Note: See TracChangeset
for help on using the changeset viewer.