from PySide import QtGui

w=QtGui.QMainWindow()

lay=QtGui.QBoxLayout(QtGui.QBoxLayout.TopToBottom)

l=QtGui.QLabel("hello world")

l2=QtGui.QLabel("QT rocks")

lay.addWidget(l)

lay.addWidget(l2)

widget = QtGui.QWidget()

widget.setLayout(lay)

w.setCentralWidget(widget)

w.show()
I just changed some stuff and its working fine

On Fri, Oct 21, 2011 at 10:03 PM, Lucien FOSTIER <[email protected]>wrote:

> Hi fellow QT enthousiast,
>
>
> I try to use the new 6.3v5 feature, that is to say do QT with PySide.
>
> I have problems with it as the code seems to work very differently...
>
>
> My first problem is to use layout
>
> I do something like
>
> from PySide import QtGui
>
>
> w=QtGui.QMainWindow()
>
> lay=QtGui.QBoxLayout(QtGui.QBoxLayout.TopToBottom)
>
> w.setLayout(lay)
>
> l=QtGui.QLabel("hello world",w)
>
> l2=QtGui.QLabel("QT rocks",w)
>
> w.show()
>
>
>
> What's wrong with my code
>
> Well the next step is to make that a class an inherit from QMainWindow?
>
> thanks for help
>
> regards
> --
> lucien FOSTIER
>
> http://lucienfostier.com
>
> _______________________________________________
> Nuke-python mailing list
> [email protected], http://forums.thefoundry.co.uk/
> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
>
>


-- 
--:: Kurian ::--
_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python

Reply via email to