开发者

QT and custom menu item (QLineEdit)

开发者 https://www.devze.com 2022-12-31 08:30 出处:网络
How can I use QLineEdit as a menu item in QMenu? Is there any solutions to do this? Just to do something like this (look at the edit box under the av开发者_C百科atar):

How can I use QLineEdit as a menu item in QMenu? Is there any solutions to do this?

Just to do something like this (look at the edit box under the av开发者_C百科atar):

QT and custom menu item (QLineEdit)


You can use a QWidgetAction to contain your QLineEdit. It inherits QAction.


Take a look at QComboBox. It allows editing of items in a pop-up menu. But if you mean the menu in the main menu bar, I don't think there's a way to do it. And it's not a good UI anyway.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号