Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
src_gui_widgets_qmenu.cpp
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
3
7
8
10exec(somewidget.mapToGlobal(QPoint(0,0)));
12
13
15exec(e->globalPos());
17
18
22
23
25exec(somewidget.mapToGlobal(QPoint(0, 0)));
27
28
30exec(e->globalPos());
32
33
36QAction *at = actions[0]; // Assumes actions is not empty
37for (QAction *a : std::as_const(actions))
38 menu.addAction(a);
The QAction class provides an abstraction for user commands that can be added to different user inter...
Definition qaction.h:30
static QPoint pos()
Returns the position of the cursor (hot spot) of the primary screen in global screen coordinates.
Definition qcursor.cpp:188
The QMenu class provides a menu widget for use in menu bars, context menus, and other popup menus.
Definition qmenu.h:26
QAction * exec()
Executes this menu synchronously.
Definition qmenu.cpp:2586
\inmodule QtCore\reentrant
Definition qpoint.h:23
double e
GLboolean GLboolean GLboolean GLboolean a
[7]
dialog exec()
QMenu menu
[5]
QAction * at