Durkin
5th March 2014, 00:52
Hello,
I 'm looking to have a QGraphicsLineItem and be able to move either of its points. Between its position and its QLine, I 've failed to determine an effective way of accomplishing this. In particular, I am baffled as to why this prints both points at 0,0:
#include <QGraphicsLineItem>
#include <QDebug>
int main()
{
QGraphicsLineItem* item = new QGraphicsLineItem;
item->line().setP1(QPointF(10, 10));
qDebug() << item->line();
}
Any clues would be welcome.
I 'm looking to have a QGraphicsLineItem and be able to move either of its points. Between its position and its QLine, I 've failed to determine an effective way of accomplishing this. In particular, I am baffled as to why this prints both points at 0,0:
#include <QGraphicsLineItem>
#include <QDebug>
int main()
{
QGraphicsLineItem* item = new QGraphicsLineItem;
item->line().setP1(QPointF(10, 10));
qDebug() << item->line();
}
Any clues would be welcome.