Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Qt button with text under icon



  • Hi,
    Does anyone know how to create button with text under the icon, and with border-image for hover pressed state. I have use QToolButton but it's not very nice!

    @ QToolButton* button = new QToolButton();
    button->setFixedHeight(70);
    button->setToolButtonStyle(Qt::ToolButtonTextUnderIcon);
    QAction* loadAction= new QAction(QIcon("://images/design/ico_add_sound.png"),"Add Sound",button);
    button->addAction(loadAction);
    button->setDefaultAction(loadAction);@

    Thank you.


Log in to reply