You'll need to check the backtrace of the crash.
Maybe "m_leftItem" is not a valid pointer.
Btw, no need to prefix member access with "this->", that is always implicit in C++
Cheers,
_
You'll need to check the backtrace of the crash.
Maybe "m_leftItem" is not a valid pointer.
Btw, no need to prefix member access with "this->", that is always implicit in C++
Cheers,
_
Hmmm what do you mean with not valid? If I do something like "this->m_LeftItem.text();" its working and I get the text which was saved there.
thats what I get from the Debugger.
0 QVector<Connections>::append qvector.h 598 0x409d29
1 QVector<Connections>:ush_back qvector.h 224 0x409ead
2 MyQTableWidgetItem::setConnection myqtablewidgetitem.cpp 36 0x403a74
3 SymbolButton::setCounterOnClick symbolbutton.cpp 68 0x403510
4 SymbolButton::changeSymbol symbolbutton.cpp 18 0x402aab
5 SymbolButton::qt_static_metacall moc_symbolbutton.cpp 92 0x4043e6
6 QMetaObject::activate C:/Qt/5.4/mingw491_32/bin/Qt5Cored.dll 3717 0x6b95a575
7 QMetaObject::activate C:/Qt/5.4/mingw491_32/bin/Qt5Cored.dll 3582 0x6b959eba
8 QAbstractButton::clicked C:/Qt/5.4/mingw491_32/bin/Qt5Widgetsd.dll 298 0x9f720c3
9 QAbstractButtonPrivate::emitClicked C:/Qt/5.4/mingw491_32/bin/Qt5Widgetsd.dll 534 0x9d353a9
10 QAbstractButtonPrivate::click C:/Qt/5.4/mingw491_32/bin/Qt5Widgetsd.dll 527 0x9d35344
11 QAbstractButton::mouseReleaseEvent C:/Qt/5.4/mingw491_32/bin/Qt5Widgetsd.dll 1132 0x9d36643
12 QWidget::event C:/Qt/5.4/mingw491_32/bin/Qt5Widgetsd.dll 8657 0x9c73ecf
13 QAbstractButton::event C:/Qt/5.4/mingw491_32/bin/Qt5Widgetsd.dll 1089 0x9d364b8
14 QPushButton::event C:/Qt/5.4/mingw491_32/bin/Qt5Widgetsd.dll 673 0x9dc3942
15 QApplicationPrivate::notify_helper C:/Qt/5.4/mingw491_32/bin/Qt5Widgetsd.dll 3720 0x9c3f4dd
16 QApplication::notify C:/Qt/5.4/mingw491_32/bin/Qt5Widgetsd.dll 3280 0x9c3d61c
17 QCoreApplication::notifyInternal C:/Qt/5.4/mingw491_32/bin/Qt5Cored.dll 935 0x6b92f330
18 QCoreApplication::sendSpontaneousEvent C:/Qt/5.4/mingw491_32/bin/Qt5Widgetsd.dll 231 0x9f9ee85
19 QApplicationPrivate::sendMouseEvent C:/Qt/5.4/mingw491_32/bin/Qt5Widgetsd.dll 2751 0x9c3c1a1
... <Mehr>
Always if I want to put my struct in the QVector my program crash.
When something like that crashes it usually means that "this" is not a valid instance.
For example an uninitialized pointer or an already deleted object.
In your SymbolButton::setCounterOnClick(), how do you get access to the item on which you then call setConnection?
Cheers,
_
ReasyEasyPeasy (19th October 2015)
I got it thanks!
Bookmarks