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
4//
5// W A R N I N G
6// -------------
7//
8// This file is not part of the Qt API. It exists for the convenience
9// of Qt Designer. This header
10// file may change from version to version without notice, or even be removed.
11//
12// We mean it.
13//
14
15#ifndef PROPERTYLINEEDIT_H
16#define PROPERTYLINEEDIT_H
17
19
20#include <QtWidgets/qlineedit.h>
21
22QT_BEGIN_NAMESPACE
23
24namespace qdesigner_internal {
25
26 // A line edit with a special context menu allowing for adding (escaped) new lines
27 class PropertyLineEdit : public QLineEdit {
29 public:
31 void setWantNewLine(bool nl) { m_wantNewLine = nl; }
32 bool wantNewLine() const { return m_wantNewLine; }
33
34 bool event(QEvent *e) override;
35 protected:
36 void contextMenuEvent (QContextMenuEvent *event ) override;
37 private slots:
38 void insertNewLine();
39 private:
40 void insertText(const QString &);
41 bool m_wantNewLine;
42 };
43}
44
45QT_END_NAMESPACE
46
47#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.