telsale-management/代码/vs2017/TelsaleAuxKit/TelsaleAuxKit/QMyStackedWidget.h

34 lines
650 B
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#ifndef QMYSTACKEDWIDGET_H
#define QMYSTACKEDWIDGET_H
#include <QHash>
#include <QtWidgets/QStackedWidget>
class QMyStackedWidget : public QStackedWidget
{
Q_OBJECT
public:
QMyStackedWidget(QWidget *parent = 0);
~QMyStackedWidget();
void addWidget( QWidget * pWidget, const QString & strWidgetName );
void removeWidget( QWidget * pWidget );
void removeWidget( const QString & strWidgetName );
void showWidget( const QString & strWidgetName );
void showWidget( int index );
protected Q_SLOTS:
private:
private:
//Ui::QMyStackedWidget ui;
QHash<QString, QWidget *> m_subWidgetTable; //×Ó´°¿Úhash±í
};
#endif // QMYSTACKEDWIDGET_H