mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Implemented the movement of the ToolTip by Hand.
Reimplement the movement of the tooltip by hand, we were adding / removing childs of the tooltip quite often, wich broke the movement of the item using the default behavior, aparently Qt uses a cache of the transformation of the item, assuming that the bounding box of it will not get modified while dragging. wich in our particular case, is a falacy. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
This commit is contained in:
parent
34c6eec9ba
commit
ad5c186553
2 changed files with 21 additions and 9 deletions
|
|
@ -34,11 +34,11 @@ public:
|
|||
void removeToolTip(const QString& toolTip);
|
||||
void refresh(struct graphics_context* gc, QPointF pos);
|
||||
bool isExpanded();
|
||||
|
||||
void persistPos();
|
||||
void readPos();
|
||||
|
||||
void mouseReleaseEvent(QGraphicsSceneMouseEvent* event);
|
||||
void mousePressEvent(QGraphicsSceneMouseEvent* event);
|
||||
void mouseReleaseEvent(QGraphicsSceneMouseEvent* event);
|
||||
bool eventFilter(QObject* , QEvent* );
|
||||
public Q_SLOTS:
|
||||
void setRect(const QRectF& rect);
|
||||
|
||||
|
|
@ -49,8 +49,8 @@ private:
|
|||
QGraphicsLineItem *separator;
|
||||
QGraphicsSimpleTextItem *title;
|
||||
Status status;
|
||||
|
||||
QRectF rectangle;
|
||||
bool dragging;
|
||||
};
|
||||
|
||||
class EventItem : public QGraphicsPolygonItem
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue