[Development] QAction in Qt 6 - next step proposal

Friedemann Kleint Friedemann.Kleint at qt.io
Wed Nov 27 11:19:59 CET 2019


Hi,

as discussed on the change, there is not much one can do with the newly 
introduced QGuiAction; it serves as a base class for QAction and 
QQuickAction, The naming follows the Q(Gui)Application pattern.

 > QMenu *menu() const;
 > -> static QMenu *QMenu::menuForAction(QAction *action);

 > void setMenu(QMenu *menu);
 > -> static void QMenu::setMenuForAction(QAction *action, QMenu *menu);

ThisĀ  in my opinion is a no-go, we cannot do source-incompatible changes 
in this area because there have been many deprecations already and code 
needs to compile against 5 and 6 with minimal changes.

Ofc, having one QAction class in QtGui is desirable; but it must not 
infer source-incompatible changes (and no, hacks like forward declaring 
QWidget from QtGui or similar are also a no-go since it causes trouble 
for Qt for Python).

Regards, Friedemann

-- 
Friedemann Kleint
The Qt Company GmbH



More information about the Development mailing list