I have to create a drop down with only image applied to it. Similar to the one shown below
DropDown.jpg

I'm using QToolButton to achieve this using the following code
Qt Code:
  1. m_pPrimitiveToolBar = addToolBar(tr("Primitives"));
  2.  
  3. m_pPrimitiveToolButton = new QToolButton(m_pPrimitiveToolBar);
  4. m_pPrimitiveToolButton->setGeometry(8, 1, 120, 30);
  5.  
  6. m_pSphereToolAction = new QAction(QIcon("Resources/UI/icons/Sphere.png"),tr(""), this);
  7. m_pSphereToolAction->setStatusTip(tr("Create Sphere"));
  8.  
  9. m_pCubeToolAction = new QAction(QIcon("Resources/UI/icons/Cube.png"), tr(""), this);
  10. m_pCubeToolAction->setStatusTip(tr("Create Cube"));
  11.  
  12. m_pPrimitiveToolButton->setPopupMode(QToolButton::MenuButtonPopup);
  13. m_pPrimitiveToolButton->addAction(m_pSphereToolAction);
  14. m_pPrimitiveToolButton->addAction(m_pCubeToolAction);
To copy to clipboard, switch view to plain text mode 

I'm getting the following output
CustomDropDown.jpg

Please suggest me the correct way to achieve this.