techartorg / bqt

A Blender add-on to support & manage Qt Widgets in Blender (PySide2)
https://github.com/techartorg/bqt/wiki
Mozilla Public License 2.0
161 stars 23 forks source link

Tooltips on QPushButton widgets trigger a warning #112

Closed DanieleBerna closed 8 months ago

DanieleBerna commented 9 months ago

Everytime the tooltip of a QPushButton is shown, a log message appears on console:

skipping widget: '<PySide2.QtWidgets.QLabel(0x1f6578a3dc0, name="qtooltip_label") at 0x000001F65ECA7980>' not window type but PySide2.QtCore.Qt.WindowType.ToolTip
skipping widget: '<PySide2.QtWidgets.QWidget(0x1f600d47ac0) at 0x000001F65F3245C0>' not window type but PySide2.QtCore.Qt.WindowType.ToolTip

To reproduce it, just add a tooltip to a button in a Dialog

button = PySide2.QtWidgets.QPushButton("Button")
button.setToolTip("Tooltip here!")
main_layout.addWidget(button)
hannesdelbeke commented 9 months ago

tried with this test code in the console (line by line), but can't repro the warning. I know why it happens but need some code to reproduce it.

import PySide2.QtWidgets

button = PySide2.QtWidgets.QPushButton("Button")
button.setToolTip("Tooltip here!")
button.show()

my button shows up and no warnings. image

hannesdelbeke commented 8 months ago

Managed to repro, should be fixed now.