In Qt 4.7, how can a pop-up menu be added to a QToolbar button?

前端 未结 3 501
独厮守ぢ
独厮守ぢ 2020-12-31 04:49

I am newbie to Qt and am currently playing about with Qt Creator and raw C++ code. I have managed to get some simple functionality working, including a menu and toolbar by a

3条回答
  •  攒了一身酷
    2020-12-31 05:05

    It seems QToolButton already has some sort of submenu, which is set with QToolButton::setPopupMode(ToolButtonPopupMode mode). If I've got you right, that would be a place to start: http://doc.qt.io/archives/qt-4.7/qtoolbutton.html#ToolButtonPopupMode-enum

提交回复
热议问题