move something more in the qgv class

This commit is contained in:
Marco Martin 2012-02-28 16:42:22 +01:00
parent 39afa5498b
commit abadc77276
2 changed files with 7 additions and 7 deletions

View File

@ -44,6 +44,13 @@ GraphicsViewAppletPrivate::GraphicsViewAppletPrivate(KService::Ptr service, cons
messageOverlayProxy(0),
busyWidget(0)
{
q->setCacheMode(QGraphicsItem::DeviceCoordinateCache);
q->setAcceptsHoverEvents(true);
q->setFlag(QGraphicsItem::ItemIsFocusable, true);
q->setFocusPolicy(Qt::ClickFocus);
// FIXME: adding here because nothing seems to be doing it in QGraphicsView,
// but it doesn't actually work anyways =/
q->setLayoutDirection(qApp->layoutDirection());
}
void GraphicsViewAppletPrivate::showMessage(const QIcon &icon, const QString &message, const MessageButtons buttons)

View File

@ -98,13 +98,6 @@ void AppletPrivate::init(const QString &packagePath)
{
// WARNING: do not access config() OR globalConfig() in this method!
// that requires a scene, which is not available at this point
q->setCacheMode(QGraphicsItem::DeviceCoordinateCache);
q->setAcceptsHoverEvents(true);
q->setFlag(QGraphicsItem::ItemIsFocusable, true);
q->setFocusPolicy(Qt::ClickFocus);
// FIXME: adding here because nothing seems to be doing it in QGraphicsView,
// but it doesn't actually work anyways =/
q->setLayoutDirection(qApp->layoutDirection());
//set a default size before any saved settings are read
QSize size(200, 200);