24 lines
395 B
C++
24 lines
395 B
C++
#pragma once
|
|
#include <QComboBox>
|
|
#include <QListView>
|
|
|
|
//自适应宽度的下列列表
|
|
class AdaptionComboBox : public QComboBox
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
AdaptionComboBox(QWidget* parent=NULL);
|
|
~AdaptionComboBox();
|
|
|
|
protected:
|
|
bool eventFilter(QObject* pWatched, QEvent* pEvent);
|
|
void resizeEvent(QResizeEvent *pEvent);
|
|
private:
|
|
void UpdateItemSize();
|
|
private:
|
|
QListView* m_pListWidget;
|
|
|
|
};
|
|
|