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
qitemeditorfactory_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 LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3// Qt-Security score:significant reason:default
4
5#ifndef QITEMEDITORFACTORY_P_H
6#define QITEMEDITORFACTORY_P_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists purely as an
13// implementation detail. This header file may change from version to
14// version without notice, or even be removed.
15//
16// We mean it.
17//
18
19
20#include <QtWidgets/private/qtwidgetsglobal_p.h>
21
22#if QT_CONFIG(lineedit)
23#include <qlineedit.h>
24
25QT_REQUIRE_CONFIG(itemviews);
26
27QT_BEGIN_NAMESPACE
28
29class QExpandingLineEdit : public QLineEdit
30{
31 Q_OBJECT
32
33public:
34 QExpandingLineEdit(QWidget *parent);
35
36 void setWidgetOwnsGeometry(bool value)
37 {
38 widgetOwnsGeometry = value;
39 }
40
41protected:
42 void changeEvent(QEvent *e) override;
43
44public Q_SLOTS:
45 void resizeToContents();
46
47private:
48 void updateMinimumWidth();
49
50 int originalWidth;
51 bool widgetOwnsGeometry;
52};
53
54
55QT_END_NAMESPACE
56
57#endif // QT_CONFIG(lineedit)
58
59#endif //QITEMEDITORFACTORY_P_H
QWidget * createEditor(int userType, QWidget *parent) const override
Creates an editor widget with the given parent for the specified userType of data,...
QByteArray valuePropertyName(int) const override
Returns the property name used to access data for the given userType of data.
friend class QWidget
Definition qpainter.h:431
The QWidget class is the base class of all user interface objects.
Definition qwidget.h:99
static QItemEditorFactory * q_default_factory