Hi there. With much effort I have tried to build a florence plug in target. My goal is to be able to use the keyboard in Qt Designer and also be able to call the keyboard when line edits receive focus. I'm trying this build in a Qt 5.5.0 with the GCC compiler on Ubuntu 14.04 distribution. I get an error that some say have to do with the code in florence using an old deprecated library or method. However I don't know how I would be able to fix this. Can anyone help me build this plug in? It will be much appreciated. Attached is a picture with the errors, warnings and the specific line with the issue. Also as advised by members of the community I'm attaching the conflicting code in between #.
{
if ( event->buttons() > Qt::NoButton ) {
Key *k = static_cast<Key *>( this->scene()->itemAt( this->mapToScene( event->pos() ) ) );
if ( k != this->focusKey ) {
this->autoRepeatTimer->stop();
if ( this->focusKey ) this->focusKey->hoverLeaveEvent();
this->focusKey = k;
if ( k ) {
k->hoverEnterEvent();
this->autoRepeatTimer->start( 1000 );
}
}
}
}
void Florence::mouseMoveEvent( QMouseEvent *event )
{
if ( event->buttons() > Qt::NoButton ) {
Key *k = static_cast<Key *>( this->scene()->itemAt( this->mapToScene( event->pos() ) ) );
if ( k != this->focusKey ) {
this->autoRepeatTimer->stop();
if ( this->focusKey ) this->focusKey->hoverLeaveEvent();
this->focusKey = k;
if ( k ) {
k->hoverEnterEvent();
this->autoRepeatTimer->start( 1000 );
}
}
}
QGraphicsView::mouseMoveEvent( event );
}
To copy to clipboard, switch view to plain text mode
The specific error is as follows:
/home/rey/Desktop/florence/qt/src/florence.cpp:147: error: no matching function for call to 'QGraphicsScene::itemAt(QPointF)'
Key *k = static_cast<Key *>( this->scene()->itemAt( this->mapToScene( event->pos() ) ) );
^
/home/rey/Desktop/florence/qt/src/florence.cpp:147: error: no matching function for call to 'QGraphicsScene::itemAt(QPointF)'
Key *k = static_cast<Key *>( this->scene()->itemAt( this->mapToScene( event->pos() ) ) );
^
To copy to clipboard, switch view to plain text mode
**Update: I know the itemAt is the problem. I have looked online for refactored code from other developers on places like Github to see how they fixed the problem. Still I get new errors when I try to fix the problem.
Bookmarks