Solved Button hover action
-
Hi. I am trying to make an info button so when the mouse is on the button a QTextEdit will show but i cannot figure out how to do this. Any suggestion? All I finded about hover refers to stylesheets but it doesn't help.
-
@Dy3zz
I don't know why you want aQTextEdit
for hovering, but before you write code to reinvent the wheel have you seen that anyQWidget
has any ofstatusTip()
,toolTip()
andwhatsThis()
available? The last one is intended to be multiline/formatted, e.g. the picture in https://doc.qt.io/qt-5/qwhatsthis.html#details.Otherwise some approach like @Mitsuriou's.
-
Hello,
If I am not mistaken, one possible thing could be making a class that inherits QPushButton, and overriding the method enterEvent. From there, you might be able to create a "floating" QTextEdit. -
@Dy3zz
I don't know why you want aQTextEdit
for hovering, but before you write code to reinvent the wheel have you seen that anyQWidget
has any ofstatusTip()
,toolTip()
andwhatsThis()
available? The last one is intended to be multiline/formatted, e.g. the picture in https://doc.qt.io/qt-5/qwhatsthis.html#details.Otherwise some approach like @Mitsuriou's.
-
@JonB Thank you so much. I didn't know about whatsThis() :)