this is my code use, but it cant build error:cannot declare variable to be of abstract type 'QWSMouseHandler
can you help me ?
#if defined(Q_OS_LINUX)
Qt::MouseButtons buttons = Qt::NoButton;
if (qFuzzyCompare(slideValue(), static_cast<qreal>(1.0f)))
{
if (event->key() == Qt::Key_Left)
{
qpoint.setX(qpoint.x() + 30);
}
if (event->key() == Qt::Key_Up)
{
qpoint.setY(qpoint.x() + 30);
}
if (event->key() == Qt::Key_Down)
{
qpoint.setX(qpoint.x() - 30);
}
if (event->key() == Qt::Key_Right)
{
qpoint.setY(qpoint.x() - 30);
}
if (event->key() == Qt::Key_Enter || event->key() == Qt::Key_Return)
{
buttons |= Qt::LeftButton;
}
//QWSServer::sendMouseEvent( qpoint, 0 );
}
#else
#if defined(Q_OS_LINUX)
QPoint qpoint = QWSMouseHandler::pos();
Qt::MouseButtons buttons = Qt::NoButton;
if (qFuzzyCompare(slideValue(), static_cast<qreal>(1.0f)))
{
if (event->key() == Qt::Key_Left)
{
qpoint.setX(qpoint.x() + 30);
}
if (event->key() == Qt::Key_Up)
{
qpoint.setY(qpoint.x() + 30);
}
if (event->key() == Qt::Key_Down)
{
qpoint.setX(qpoint.x() - 30);
}
if (event->key() == Qt::Key_Right)
{
qpoint.setY(qpoint.x() - 30);
}
if (event->key() == Qt::Key_Enter || event->key() == Qt::Key_Return)
{
buttons |= Qt::LeftButton;
}
QWSMouseHandler::mouseChanged (qpoint,buttons,0);
//QWSServer::sendMouseEvent( qpoint, 0 );
}
#else
To copy to clipboard, switch view to plain text mode
src/BrowserWindow.cpp:101: error: cannot declare variable 'qwsMouse' to be of abstract type 'QWSMouseHandler'
../../../../install/include/QtGui/qmouse_qws.h:67: note: because the following virtual functions are pure within 'QWSMouseHandler':
../../../../install/include/QtGui/qmouse_qws.h:77: note: virtual void QWSMouseHandler::resume()
../../../../install/include/QtGui/qmouse_qws.h:78: note: virtual void QWSMouseHandler::suspend()
src/BrowserWindow.cpp:127: error: no matching function for call to 'QWSMouseHandler::mouseChanged(QPoint*, Qt::MouseButtons&, int)'
../../../../install/include/QtGui/qmouse_qws.h:81: note: candidates are: void QWSMouseHandler::mouseChanged(const QPoint&, int, int)
make: *** [BrowserWindow.o] Error 1
Bookmarks