void textedit::multitouch(QEvent *event)
{
{
QTextCursor cursor;
cursor = this->textCursor();
if (cursor.hasSelection())
{
QTouchEvent *touchEvent = static_cast<QTouchEvent *>(event);
QList<QTouchEvent::TouchPoint> touchPoints = touchEvent->touchPoints();
if (touchPoints.count() == 2) {
const QTouchEvent::TouchPoint &touchPoint0 = touchPoints.first();
const QTouchEvent::TouchPoint &touchPoint1 = touchPoints.last();
QLineF (touchPoint0.lastScenePos(), touchPoint1.lastScenePos());
if (touchEvent->touchPointStates() & Qt::TouchPointReleased)
{
textion->show();
}
}
}
}
}