[Kde-games-devel] Issues with KGamePopupItem

Parker Coates parker.coates at gmail.com
Fri Oct 5 03:08:55 CEST 2007


Hello all,

I've run into some trouble with KGamePopupItem. The API is pretty
simple so I can't really see where I could be going wrong.

I can successfully create the item, add it to my scene, and show it.
My problem is that it completely ignores mouse input. Hovering doesn't
keep it open and clicking doesn't close it. I know it's not a problem
with my libkdegames install, because it works properly in other games.

Do I need to set some setting on my scene or view to get it working?
Stripped down example code follows.

========================================

Board::Board( QObject * parent )
  : QGraphicsScene( parent ),
    m_message( new KGamePopupItem() )
{
    m_message->setMessageOpacity( 0.9 );
    addItem( m_message );
}

void Board::roundComplete()
{
    m_message->setMessageTimeout( 3000 );
    m_message->showMessage( i18n("Round complete."),
KGamePopupItem::TopLeft, KGamePopupItem::ReplacePrevious );
}

========================================

Any suggestions would be greatly appreciate.

Thanks,

Parker


More information about the kde-games-devel mailing list