PyQt layout got squeezed.

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
  08 August 2012
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.


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()
 
  08 August 2012
Try:



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()
 
  08 August 2012
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



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 05:18 AM.


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