Hi

I got this strange problem that QTableWidget and QTreeWidget do not update 
until resized when docked over the attrbute editor.

There is probably more that don't work as expected but these are what I 
have noticed so far.

Have anyone noticed anything similar?

If I tear it off from the right dock and then dock it again it works as it 
should/expected so I think the error it somewhere at the end with the 
show, workspaceControl and raise_

Anyone got some ideas?

This is the code I am trying to use to dock our import asset panel.

from ftrackplugin import ftrackDialogs
from fido import common

from maya.app.general.mayaMixin import MayaQWidgetDockableMixin
from PySide2 import QtWidgets, QtCore
    
controlName = 'foobar'

class FooWidget(MayaQWidgetDockableMixin, QtWidgets.QWidget):
    def __init__(self, parent=None):
        super(FooWidget, self).__init__(parent=parent)
        global controlName
        self.setObjectName(controlName)
        self.setWindowTitle(controlName)
        vlayout = QtWidgets.QVBoxLayout(self)
        # ftrackImportDialog just becomes a QWidget
        ftrackImportDialog = ftrackDialogs.ftrackImportAssetQt()
        vlayout.addWidget(ftrackImportDialog)
        self.setLayout(vlayout)

# getMainWindow is just a wrapper function around the regular ways        
mw = common.getMainWindow()        
bar = FooWidget(mw)

workspaceControlName = bar.objectName() + 'WorkspaceControl'

mayaPanelName = "AttributeEditor"
mc.setParent(mayaPanelName)

if mc.workspaceControl(workspaceControlName, q=True, exists=True):
    mc.workspaceControl(workspaceControlName, e=True, close=True)
    mc.deleteUI(workspaceControlName, control=True)
    
    
bar.show(dockable=True, area='right', floating=False)
mc.workspaceControl(workspaceControlName, edit=True, 
tabToControl=[mayaPanelName, -1], widthProperty="preferred", 
minimumWidth=620)
bar.raise_()


Cheers,
Erik

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/73556f3e-358b-482c-a50b-675b782c6f35%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to