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
propertylineedit_p.h
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
3// Qt-Security score:significant reason:default
4
5//
6// W A R N I N G
7// -------------
8//
9// This file is not part of the Qt API. It exists for the convenience
10// of Qt Designer. This header
11// file may change from version to version without notice, or even be removed.
12//
13// We mean it.
14//
15
16#ifndef PROPERTYLINEEDIT_H
17#define PROPERTYLINEEDIT_H
18
20
21#include <QtWidgets/qlineedit.h>
22
23QT_BEGIN_NAMESPACE
24
25namespace qdesigner_internal {
26
27 // A line edit with a special context menu allowing for adding (escaped) new lines
28 class PropertyLineEdit : public QLineEdit {
30 public:
32 void setWantNewLine(bool nl) { m_wantNewLine = nl; }
33 bool wantNewLine() const { return m_wantNewLine; }
34
35 bool event(QEvent *e) override;
36 protected:
37 void contextMenuEvent (QContextMenuEvent *event ) override;
38 private slots:
39 void insertNewLine();
40 private:
41 void insertText(const QString &);
42 bool m_wantNewLine;
43 };
44}
45
46QT_END_NAMESPACE
47
48#endif // PROPERTYLINEEDIT_H
void contextMenuEvent(QContextMenuEvent *event) override
This event handler, for event event, can be reimplemented in a subclass to receive widget context men...
bool event(QEvent *e) override
This virtual function receives events to an object and should return true if the event e was recogniz...
Combined button and popup list for selecting options.
Auxiliary methods to store/retrieve settings.