]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/ModuleBase/ModuleBase_ToolBox.cpp
Salome HOME
Add tools
[modules/shaper.git] / src / ModuleBase / ModuleBase_ToolBox.cpp
index 0af3267b19d008747769ebfd4543156172258d97..7f8736a250fb110f49948a9eecadd6d8778a42e5 100644 (file)
@@ -23,7 +23,7 @@ ModuleBase_ToolBox::ModuleBase_ToolBox( QWidget* theParent )
   aMainLayout->addWidget( myButtonsFrame, 0 );
   aMainLayout->addWidget( myStack, 1 );
 
-  myButtonsGroup = new QButtonGroup();
+  myButtonsGroup = new QButtonGroup(this);
   myButtonsGroup->setExclusive( true );
   myButtonsLayout = new QHBoxLayout( myButtonsFrame );
   myButtonsLayout->setMargin( 0 );
@@ -38,7 +38,7 @@ ModuleBase_ToolBox::~ModuleBase_ToolBox()
 {
 }
 
-void ModuleBase_ToolBox::addItem( QWidget* thePage, const QString& theName, const QIcon& theIcon )
+void ModuleBase_ToolBox::addItem( QWidget* thePage, const QString& theName, const QPixmap& theIcon )
 {
   int anOldCount = myStack->count();
 
@@ -47,6 +47,7 @@ void ModuleBase_ToolBox::addItem( QWidget* thePage, const QString& theName, cons
   QToolButton* aButton = new QToolButton( myButtonsFrame );
   aButton->setCheckable( true );
   aButton->setIcon( theIcon );
+  aButton->setIconSize( theIcon.size() );
   aButton->setToolTip( theName );
   myButtonsGroup->addButton( aButton, anOldCount );
   myButtonsLayout->insertWidget( anOldCount, aButton );