summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/textedit.h
blob: 1b90c02489844d512e8085e0e58c0851448f6c55 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// SPDX-License-Identifier: GPL-2.0
#ifndef TEXTEDIT_H
#define TEXTEDIT_H

#include <QTextEdit>

// QTextEdit does not possess a signal that fires when the user finished
// editing the text. This subclass therefore overrides the focusOutEvent
// and sends the textEdited signal.
class TextEdit : public QTextEdit {
	Q_OBJECT
public:
	using QTextEdit::QTextEdit; // Make constructors of QTextEdit available
signals:
	void editingFinished();
private:
	void focusOutEvent(QFocusEvent *ev) override;
};

#endif