Details
-
Bug
-
Resolution: Out of scope
-
P2: Important
-
4.4.1
-
None
Description
If two widgets are created and images are set to their tooltips (like <img src="...." width="128" height="128">). When the application is started, show the first tooltip (normally with mouse cursor) and then (when tooltip is showed) change cursor position to show the second tooltip, it still shows the same image for the second tooltip.
Example code:
#include <QApplication>
#include <QVBoxLayout>
#include <QWidget>
class MyWidget : public QWidget
{
public:
MyWidget(QWidget *parent = 0);
};
MyWidget::MyWidget(QWidget *parent)
: QWidget(parent)
{
QWidget *w1 = new QWidget();
w1->setToolTip("<img src=\"C:\\Users\\Pictures\\image1.png\" width=\"128\" height=\"128\"/>");
QWidget *w2 = new QWidget();
w2->setToolTip("<img src=\"C:\\Users\\Pictures\\image2.png\" width=\"128\" height=\"128\"/>");
QVBoxLayout *layout = new QVBoxLayout;
layout->addWidget(w1);
layout->addWidget(w2);
setLayout(layout);
}
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
MyWidget widget;
widget.show();
return app.exec();
}