Hi all:
I've got this error in my application when I run in the release mode on Windows( on Ubuntu ,whether in debug or release mode ,there's no problem.And debug mode on Windows is ok). I think this error is related to a C++ library which I used in my application.In the library ,I build a class,which inherit from the QWidget class. And I build another class who is name is XXXmanger ,inherit from the QObject class to manage the widget class .When I try to new the manager class, the app goes wrong.
CHistoryFormManager
::CHistoryFormManager(QObject *parent
) : CbaseFormManager(parent)
{
d_ptr = new CHistoryFormManagerPrivate;
d_ptr->q_ptr = this;
}
CHistoryFormManager::CHistoryFormManager(QObject *parent) :
CbaseFormManager(parent)
{
d_ptr = new CHistoryFormManagerPrivate;
d_ptr->q_ptr = this;
}
To copy to clipboard, switch view to plain text mode
This is the construction function of the manager class .
class CHistoryFormManagerPrivate
{
CHistoryFormManager * q_ptr;
Q_DECLARE_PUBLIC(CHistoryFormManager)
public:
void addItem();
void deleteItem();
void openItem();
int m_index;
QList<CHistoryForm *> m_formList;
QList<QStandardItem *> m_newedItemList;
QMap<QStandardItem*,CHistoryForm*> m_map;
private:
void createTreeMenu
(QWidget * parent
);
// create tree Menu void createItemMenu
(QWidget * parent
);
// create Item Menu
void createItemAction
(QWidget * parent
);
void createTreeAction
(QWidget * parent
);
};
class CHistoryFormManagerPrivate
{
CHistoryFormManager * q_ptr;
Q_DECLARE_PUBLIC(CHistoryFormManager)
public:
void addItem();
void deleteItem();
void openItem();
int m_index;
QMenu *m_treeMenu;
QMenu *m_itemMenu;
QAction *m_addFormAction;
QAction *m_deleteFormAction;
QAction *m_openItemAction;
QStandardItem *m_item;
QWidget *m_widget;
QTreeView *m_treePro;
QList<CHistoryForm *> m_formList;
QList<QStandardItem *> m_newedItemList;
QMap<QStandardItem*,CHistoryForm*> m_map;
private:
void createTreeMenu(QWidget * parent); // create tree Menu
void createItemMenu(QWidget * parent); // create Item Menu
void createItemAction(QWidget * parent);
void createTreeAction(QWidget * parent);
};
To copy to clipboard, switch view to plain text mode
This is the private class of the manager class.
Please help. Thanks.
Bookmarks