title: How to use focusInEvent and focusOutEvent
body: <p>I am implementing an application in which i am having 3 <code>QToolButton</code> and when the focus is coming on any <code>QToolButton</code> it should <code>resize</code>.
  One of my friend has given me answer but i am unable to figure it out as i am inheriting <code>QMainWindow</code> class as well in my mainWindow. He is telling to inherit <code>QToolButton</code> too. But multiple inheritance problem will occur. So how exactly to use <code>focusInEvent()</code>.</p>
  
  <pre><code>MyCode:
  mywindow.h :
  
  class mywindow : public QMainWindow
  {
      Q_OBJECT
  public:
      mywindow() ;
  
  protected:
      void keyReleaseEvent(QKeyEvent *event); 
      void focusInEvent(QFocusEvent *event);
      void focusOutEvent(QFocusEvent *event);
  
  private:
      QWidget *widget;
      QStackedWidget *stack1;
      QToolBar *tool;
      QListWidget *list1;
      QListWidget *list2;
      QVBoxLayout *vertical;
      QToolButton *button1;
      QToolButton *button2;
      QToolButton *button3;
  
  public slots:
      void fileNew();
      void file();
      bool eventFilter(QObject *object, QEvent *event);
  
  };
  </code></pre>
  
  <p>mywindow.cpp :</p>
  
  <pre><code>mywindow::mywindow() : QMainWindow()
  {   
    //some code
  }
  </code></pre>
  
  <p>My friend's code which i have to merge :</p>
  
  <pre><code>class mywindow : public QToolButton
  {
      private:
           int originalWidth, originalHeight;
           int bigWidth, bigHeight;
  };
  
  void focusInEvent ( QFocusEvent * event ) { 
                     resize(bigWidth,bigHeight); 
                     QToolButton::focusInEvent(event); 
  }
  
  void focusOutEvent ( QFocusEvent * event ) { 
                     resize(originalWidth,originalHeight); 
                     QToolButton::focusOutEvent(event);
  }
  </code></pre>