CGTalk > Software > Autodesk Maya > Maya Programming
Login register
Thread Closed share thread « Previous Thread | Next Thread »  
 
Thread Tools Search this Thread Display Modes
Old 08-22-2012, 06:42 AM   #1
Panupat
Expert
 
Panupat's Avatar
portfolio
Panupat Chong
Thailand
 
Join Date: Feb 2004
Posts: 1,942
PyQt layout got squeezed.

I'm trying to create UI from Qt Designer and am having some weird problem.

Laying out labels and combo boxes, no problem
Putting them into QHBoxLayout, no problem

But as soon as I apply Lay Out to the whole thing, everything got squeezed into the corner. Happens in both Maya 2011 and 2012. The UI looks fine in Qt Designer.

http://img210.imageshack.us/img210/7756/pyqtsqueeze.png

Am I overlooking something?

I'm using uic to display the ui.

Code:
class UI(QtGui.QMainWindow): def __init__(self, parent=getMayaWindow()): QtGui.QMainWindow.__init__(self, parent) self.ui = uic.loadUi('%sassetLib.ui' % UIPATH, self) test = UI() test.ui.show()
 
Old 08-23-2012, 05:49 PM   #2
fezz
Render slave
 
fezz's Avatar
portfolio
Michael Fessenden
Pipeline TD, Mr. X
Toronto, Canada
 
Join Date: Aug 2005
Posts: 254
Send a message via AIM to fezz
Try:



Code:
class UI(QtGui.QMainWindow): def __init__(self, parent=getMayaWindow()): QtGui.QMainWindow.__init__(self, parent) self.ui = uic.loadUi('%sassetLib.ui' % UIPATH, self) self.setCentralWidget(self.ui) test = UI() test.ui.show()
 
Old 08-23-2012, 05:49 PM   #3
CGTalk Moderation
Expert
CGTalk Forum Leader
 
Join Date: Sep 2003
Posts: 1,066,478
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 01:35 AM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.