A standard Maya outliner with some buttons around it, some mode selectors and so on.Īnd its working very well. Could you explain why you would want to do this and not just use PyQt? are you trying to add a new tool to a legacy tool UI?Īctually i’m writing some Enhanced Outliner. You shouldn’t want or need to do that (not sure if it’s your choice). I’ve tried to set some size policies but nothing happens (actually i’m almost sure that problem is not in size policies) The problem is that widget is not resizing instead of how to embed a widget. Then i’ve added a QHBoxLayout to wrapped instance and then i add my QListWidget. Return sip.wrapinstance(long(ptr), QtCore.QObject)Īs you can see in my code i’m doing it exactly like you’ve said So how can i embed a QWidget in this UI and make it resize with frameLayout?Įither way I haven’t tried this either but I’m guessing you would have to do something like this: Self.attachLayoutQ = sip.wrapinstance(long((self.attachLayout)), QtCore.QObject) M.formLayout(self.ui_LAY_mainForm, e = True, attachNone = (self.ui_LAY_toolbar, 'left')) M.formLayout(self.ui_LAY_mainForm, e = True, attachForm = (self.ui_LAY_toolbar, 'bottom', 2)) M.formLayout(self.ui_LAY_mainForm, e = True, attachForm = (self.ui_LAY_toolbar, 'right', 2)) M.formLayout(self.ui_LAY_mainForm, e = True, attachForm = (self.ui_LAY_toolbar, 'top', 2)) M.formLayout(self.ui_LAY_mainForm, e = True, attachForm = (self.attachLayout, 'left', 2)) M.formLayout(self.ui_LAY_mainForm, e = True, attachForm = (self.attachLayout, 'bottom', 2)) M.formLayout(self.ui_LAY_mainForm, e = True, attachControl = (self.attachLayout, 'right', 2, self.ui_LAY_toolbar)) M.formLayout(self.ui_LAY_mainForm, e = True, attachForm = (self.attachLayout, 'top', 2)) M.symbolCheckBox(image = 'sortName', height = 35, width = 35) Self.attachLayout = m.frameLayout(labelVisible = False) Self.window = m.window( UI_WIN_NAME, title = UI_WIN_TITLE, maximizeButton = False,) If m.window(UI_WIN_NAME, exists = True) : m.deleteUI(UI_WIN_NAME, window = True) Looks like my QHBoxLayout setup doesn’t work but i dont know why. There is a frameLayout which is resizing with the main window, but the problem is that my QListWidget in that frameLayout does not. I need to put a PyQt (for example a QListWidget) widget in UI which is created using MEL (i mean my tool UI… not some Maya main window place)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |