Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
import pymxs
from PySide2 import QtCore
from PySide2 import QtWidgets
import MaxPlus
class PyMaxDialog(QtWidgets.QDialog):
def __init__(self, parent=MaxPlus.GetQMaxMainWindow()):
super(PyMaxDialog, self).__init__(parent)
self.setWindowTitle('Pyside Qt Window')
self.initUI()
def initUI(self):
self.main_layout = QtWidgets.QVBoxLayout()
self.label = QtWidgets.QLabel("Click button delete this text")
self.main_layout.addWidget(self.label)
delete_btn = QtWidgets.QPushButton("Delete")
delete_btn.clicked.connect(self.remove_text)
self.main_layout.addWidget(delete_btn)
self.setLayout(self.main_layout)
self.resize(250, 100)
@QtCore.Slot()
def remove_text(self):
self.main_layout.removeWidget(self.label)
pymxs.runtime.RedrawViews()
def main():
w = PyMaxDialog()
w.show()
if __name__ == '__main__':
main()
execute this code and click on the Delete button.
those are before/ and after images
Is this normal?
for me, this looks like a bug
I tested this in max 2019 on two different machine
Solved! Go to Solution.
