On Friday, September 23, 2011 15:24:09 jignesh kakadiya wrote:
> I am fixing https://bugs.kde.org/show_bug.cgi?id=235545 .

cool :)

> Can any one suggest me how to modify the QToolTip positon such that it will
> display in the center of the screen

displaying it in the center of the screen is probably even worse since it 
means it will block anything in the center of the screen.

instead, i'd suggest moving it when the mouse cursor is moved over it. perhaps 
to the opposite corner of the screen.

it could also be moved to the top center of the screen (be careful about 
multiple screens, in that case, of course :), though it would still require 
"move when mouse enters".

anyways.. in snapshottimer.cpp, you can move it using move(QPoint) .. e.g., 
something like:

const QRect screenGeom = qApp->desktop()->screenGeometry();
move(screenGeom.x() / 2 - width() / 2, screenGeom.y());

then in an enterEvent(QEvent *event) you could do something like:

const QRect screenGeom = qApp->desktop()->screenGeometry();
move(screenGeom.x() / 2 - width() / 2, screenGeom.bottom());

(moving it to the bottom of the screen, and away from the mouse .. )

-- 
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

KDE core developer sponsored by Qt Development Frameworks

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel

Reply via email to