ToolTip for qPushButton is displayed far away from butten control.
Sayajirao last edited by
I have implemented a qPushButton in my VC++ application. The implementation is as shown below.
m_pBtnCurr = new QPushButton("");
m_pBtnCurr->setToolTip(tr("Go to current time"));
The tooltip is displayed at appropriate location but on some machines the tooltip is displayed far away from the button. The font is also bigger in that case. Is there any other way to implement this? Can we specify the location for the tooltip?
JonB last edited by
I don't think I've ever had a problem with tooltip appearing where button is. Just possibly, I don't know, is your button on a layout or not, that might affect position?
If you have to, there is https://doc.qt.io/qt-5/qtooltip.html#showText-1 etc. which can be used to position tooltip. I think you then have to handle invoking tooltip yourself.