Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
src_gui_widgets_qlineedit.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
4
//! [0]
5
void
LineEdit::contextMenuEvent(QContextMenuEvent *event)
6
{
7
QMenu *menu = createStandardContextMenu();
8
menu->addAction(tr(
"My Menu Item"
));
9
//...
10
menu->exec(event->globalPos());
11
delete
menu;
12
}
13
//! [0]
qtbase
src
widgets
doc
snippets
code
src_gui_widgets_qlineedit.cpp
Generated on
for Qt by
1.14.0