DtkWidget
DTK Widget module
载入中...
搜索中...
未找到
dcombobox_p.h
1// SPDX-FileCopyrightText: 2021 - 2026 UnionTech Software Technology Co., Ltd.
2//
3// SPDX-License-Identifier: LGPL-3.0-or-later
4
5#ifndef DCOMBOBOX_P_H
6#define DCOMBOBOX_P_H
7
8#include "dcombobox.h"
9#include <DObjectPrivate>
10#include <QPersistentModelIndex>
11
12DWIDGET_BEGIN_NAMESPACE
13
14class DComboBoxPrivate : public DCORE_NAMESPACE::DObjectPrivate
15{
16 Q_DECLARE_PUBLIC(DComboBox)
17public:
18 explicit DComboBoxPrivate(DComboBox* q);
19
20 void init();
21
22 // 重写 QComboBoxPrivate类的popupGeometry
23 QRect popupGeometry();
24
25 // 重写 QComboBoxPrivate类的computeWidthHint
26 int computeWidthHint() const;
27
28 // 最大显示项数
29 static const int MaxVisibleItems = 16;
30
31 QPersistentModelIndex popupIndexBeforeLeave;
32 bool popupIndexClearedByLeave = false;
33};
34
35DWIDGET_END_NAMESPACE
36
37#endif // DCOMBOBOX_P_H
Definition dcombobox_p.h:15
DComboBox 重写QComboBox, 提供一个下拉列表供用户选择
Definition dcombobox.h:16