Hello folks
I have a simple question regarding pointers. I have a programe which should make some of the items of a qlistview bold. I have declared a pointer to the class where i have functions who can distinguish which items should be bold. But the crashes on that pointer.
Here is my code
Code:
pItem->bold = false; if (pItem->m_pHL) { // programe crashes here if (pItem->m_pHL->STestt()->IsTested()) { pItem->bold = true; pItem->setOpen(true); } QListViewItem *p = pItem->parent(); while(p) { ((CTestViewItem*)p)->bold = true; p = p->parent(); } }
and this the declaration of the pointer
Code:
CHL m_pHL;
Can someone tell what i am doing wrong?