Hi All,
I am working on Qt 4.3.4 on my Windows.
I have a QTreeWidget of items and I want to show a dialog when user right click on that item.
How to do it?
Plz help me out.
Thanks.
Vishal
Hi All,
I am working on Qt 4.3.4 on my Windows.
I have a QTreeWidget of items and I want to show a dialog when user right click on that item.
How to do it?
Plz help me out.
Thanks.
Vishal
Hi,
connect qtreewidget.html#itemClicked to a custom slot and there create your dialog.
Ginsengelf
Last edited by Ginsengelf; 4th August 2008 at 08:00. Reason: link wrong
But it will work on either click (right or left).
But Actually I want to implement the right click property of windows.
Do you mean "context menu"? If so, search the forums, please.
J-P Nurmi
Yes I am talking about context menu.
Thanks.
first, set next property for widget for which context menu is needed.
Qt Code:
yourWidget->setContextMenuPolicy(Qt::CustomContextMenu)To copy to clipboard, switch view to plain text mode
then,
Qt Code:
To copy to clipboard, switch view to plain text mode
and last you need to show context menu in.Qt Code:
To copy to clipboard, switch view to plain text mode
Bookmarks