Obsolete Members for QContextMenuEvent

I seguenti membri della classe ` QContextMenuEvent ` sono deprecati. Sono forniti per garantire il funzionamento del codice sorgente esistente. Si sconsiglia vivamente di utilizzarli nel nuovo codice.

Funzioni pubbliche

(deprecated in 6.4) QContextMenuEvent(QContextMenuEvent::Reason reason, const QPoint &pos)

Documentazione sulle funzioni membro

[deprecated in 6.4] QContextMenuEvent::QContextMenuEvent(QContextMenuEvent::Reason reason, const QPoint &pos)

Questa funzione è deprecata a partire dalla versione 6.4. Si sconsiglia vivamente di utilizzarla nel codice nuovo.

Utilizzare invece l'altro costruttore (è richiesta la posizione globale).

Crea un oggetto evento del menu contestuale con il flag del parametro `accept` impostato su `false`.

Il parametro ` reason ` deve essere ` QContextMenuEvent::Mouse ` o ` QContextMenuEvent::Keyboard`.

Il parametro ` pos ` specifica la posizione del mouse rispetto al widget ricevente.

globalPos() viene inizializzato a QCursor::pos(), il che potrebbe non essere appropriato. Utilizzare l'altro costruttore per specificare esplicitamente la posizione globale.

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.