How to use QAction.menu() in PyQt6
JakobDev
jakobdev at gmx.de
Wed May 19 21:56:50 BST 2021
Am 16.05.21 um 13:19 schrieb Phil Thompson:
> On 16/05/2021 11:40, JakobDev wrote:
>> I need the menu function of QAction in one of my applications that I
>> want to port to Qt 6. The changelog at
>> https://doc.qt.io/qt-6/widgets-changes-qt6.html says that, Member
>> functions that depend on types defined in QtWidgets (such as
>> QAction::menu() and QAction::setMenu()) are implemented as templates
>> that will be instantiated only when called. But how can I do that in
>> PyQt6?
>
> https://www.riverbankcomputing.com/static/Docs/PyQt6/api/qtgui/qaction.html#qaction-in-widget-applications
>
>
> Phil
The link doesn't provide any information about QAction.menu(). The
suggestion from Tobias Rzepka that I should use QToolButtonn
unfortunately doesn't help, because the QAction is not in a Toolbar.
More information about the PyQt
mailing list