|
@@ -20,8 +20,16 @@ public:
|
|
|
|
|
|
//重写下拉框弹出位置
|
|
|
void showPopup() override;
|
|
|
+ /* 禁用滚轮修改内容 */
|
|
|
+ void setWheelDisabled(bool disabled = true) { m_wheelDisabled = disabled; }
|
|
|
+
|
|
|
+
|
|
|
+protected:
|
|
|
+ void wheelEvent(QWheelEvent *event) override;
|
|
|
+
|
|
|
private:
|
|
|
const int LISTVIEW_MARGIN = 12; // QAbstractItemView边距(阴影宽度)
|
|
|
+ bool m_wheelDisabled = false; // 是否禁用滚轮修改内容
|
|
|
};
|
|
|
|
|
|
#endif // _CUSTOMCOMBOBOX_H_
|