tags:

views:

155

answers:

2

Hi

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 avatar):

alt text

A: 

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.

Stephen Chu
I've attached a picture in my question. I need something like this - editbox in popup menu.
silent
+4  A: 

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

Leiaz
Wow, thank you. Seems like it exactly what I need.I'll try it.
silent