Created
July 9, 2020 11:50
-
-
Save paulwinex/f557c124422633b03754278bcfb17ac3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from PySide2.QtCore import * | |
from PySide2.QtGui import * | |
from PySide2.QtWidgets import * | |
from pymel.core import * | |
text = '''<h2>Title</h2> | |
Some text | |
<a href="https://google.com">Help</a> | |
''' | |
lb = QLabel(ui.PyUI('MayaWindow').asQtObject()) | |
lb.setTextInteractionFlags(Qt.TextBrowserInteraction) | |
lb.setOpenExternalLinks(True) | |
lb.setMinimumWidth(500) | |
lb.setStyleSheet(''' | |
QWidget{ | |
background-color: #ffffdb; | |
color:black; | |
padding: 10px 10px 10px 10px; | |
} | |
''') | |
lb.setWindowFlags(Qt.ToolTip) | |
lb.setText(text.replace('\n', '<br>')) | |
lb.show() | |
# lb.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment