My c++ program crashes when i add new QGraphicsLineItem to a QList of QGraphicsPixmapItem.
Below is the function.
void MainWindow::linkComputerNodes(QList<Node*> routers)
Your for loop:
Goes through every single router in your list, but then you add a link from each router to the router directly after it. This means that for the last router, you are trying to add a link to one that doesn't exist. Try changing your loop to:
for(int i=0;i<routers.length() - 1;i++)
So that you only add links between existing routers.