How to copy the content of a QPopupMenu ?

David Boddie david at boddie.org.uk
Wed Apr 5 09:55:11 EDT 2006


Well, the Google web interface didn't quite work as expected there.
Here's a version of the previous message containing just my advice.


You might want to use QAction to define individual items that can be
activated. That way you can just reuse the same actions in both menus
or move them from one to another.  Submenus will probably  take more
effort to move. In some ways, it might be useful to keep some sort of
data structure around that you can use as a template for the menu, and
regenerate the menu from that.


Aside: The Qt 4 action system probably makes it a lot easier to do what
you're trying to do, though that's not a lot of help if your project is
based on Qt 3. :-/




More information about the Python-list mailing list