Thanks Aaron :).<br><br>I used move() and it works fine with the hard coded values.I am in the verge of it.Only thing remains <br>Is to set the position in the screenGeometry i.e widht ,height format.<br><br>I have reimplemented mouseMoveEvent(QMouseEvent*) as it was not there earlier.<br>
<br>Now when I used qApp->desktop->screenGeometry() It was giving following error. Any Idea how to tackle with this.Is there any other way to getwidth.<br><br><br>home/jiggy/kde/src/ksnapshot/snapshottimer.cpp: In member function ‘virtual void SnapshotTimer::mouseMoveEvent(QMouseEvent*)’:                                                                 <br>
/home/jiggy/kde/src/ksnapshot/snapshottimer.cpp:76:49: error: invalid use of incomplete type ‘struct QDesktopWidget’<br>/usr/include/qt4/QtGui/qapplication.h:73:7: error: forward declaration of ‘struct QDesktopWidget’<br>
/home/jiggy/kde/src/ksnapshot/snapshottimer.cpp: In member function ‘virtual void SnapshotTimer::mouseMoveEvent(QMouseEvent*)’:<br>/home/jiggy/kde/src/ksnapshot/snapshottimer.cpp:76:49: error: invalid use of incomplete type ‘struct QDesktopWidget’<br>
/usr/include/qt4/QtGui/qapplication.h:73:7: error: forward declaration of ‘struct QDesktopWidget’<br>make[2]: *** [CMakeFiles/kbackgroundsnapshot.dir/snapshottimer.o] Error 1<br>make[1]: *** [CMakeFiles/kbackgroundsnapshot.dir/all] Error 2<br>
make[1]: *** Waiting for unfinished jobs....<br>make[2]: *** [CMakeFiles/ksnapshot.dir/snapshottimer.o] Error 1<br>make[1]: *** [CMakeFiles/ksnapshot.dir/all] Error 2<br>make: *** [all] Error 2<br><br>Thanks,<br>Jignesh<br>
<div class="gmail_quote">On Fri, Sep 23, 2011 at 6:21 PM, Aaron J. Seigo <span dir="ltr"><<a href="mailto:aseigo@kde.org">aseigo@kde.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On Friday, September 23, 2011 15:24:09 jignesh kakadiya wrote:<br>
> I am fixing <a href="https://bugs.kde.org/show_bug.cgi?id=235545" target="_blank">https://bugs.kde.org/show_bug.cgi?id=235545</a> .<br>
<br>
</div>cool :)<br>
<div class="im"><br>
> Can any one suggest me how to modify the QToolTip positon such that it will<br>
> display in the center of the screen<br>
<br>
</div>displaying it in the center of the screen is probably even worse since it<br>
means it will block anything in the center of the screen.<br>
<br>
instead, i'd suggest moving it when the mouse cursor is moved over it. perhaps<br>
to the opposite corner of the screen.<br>
<br>
it could also be moved to the top center of the screen (be careful about<br>
multiple screens, in that case, of course :), though it would still require<br>
"move when mouse enters".<br>
<br>
anyways.. in snapshottimer.cpp, you can move it using move(QPoint) .. e.g.,<br>
something like:<br>
<br>
const QRect screenGeom = qApp->desktop()->screenGeometry();<br>
move(screenGeom.x() / 2 - width() / 2, screenGeom.y());<br>
<br>
then in an enterEvent(QEvent *event) you could do something like:<br>
<br>
const QRect screenGeom = qApp->desktop()->screenGeometry();<br>
move(screenGeom.x() / 2 - width() / 2, screenGeom.bottom());<br>
<br>
(moving it to the bottom of the screen, and away from the mouse .. )<br>
<font color="#888888"><br>
--<br>
Aaron J. Seigo<br>
humru othro a kohnu se<br>
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43<br>
<br>
KDE core developer sponsored by Qt Development Frameworks<br>
</font><br>_______________________________________________<br>
Plasma-devel mailing list<br>
<a href="mailto:Plasma-devel@kde.org">Plasma-devel@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/plasma-devel" target="_blank">https://mail.kde.org/mailman/listinfo/plasma-devel</a><br>
<br></blockquote></div><br>