Hey Everyone,

I am sending this mail as a complete newcomer to GUI programming under Python, 
so please bear with me if question or audience do not fit to each other.

I would like to have a small GUI in Python that features something I would call 
crossed tabs. The idea is to have both a vertical and horizontal tabWidget and 
have the canvas inside of the tabs change corresponding to which tabs are 
selected. I have attached a small example picture 
(http://imageshack.us/photo/my-images/13/whashouldlooklike.jpg/ ). The user 
should be able to choose a discipline and a component and a corresponding list 
of parameters will be displayed.

I have played around a little with pySide but have not come that far. I have 
attached an example of how far I got. 
http://imageshack.us/photo/my-images/835/whalookslike.jpg/

Any help is greatly appreciated. A simple: "This is not possible" is also of 
value ;-)

Thanks
Daniel

#!/usr/bin/env python

from PySide import QtCore, QtGui
import sys

#Initial stuff
app = QtGui.QApplication(sys.argv)
myDialog = QtGui.QMainWindow()

#===============================================================================
#Create Vertical Tabs
verTabWidget        = QtGui.QTabWidget()
verTabWidget.setTabPosition(QtGui.QTabWidget.West)
tabNested           = QtGui.QWidget()
tabNested2          = QtGui.QWidget()
verTabWidget.addTab(tabNested, "Bla")
verTabWidget.addTab(tabNested2, "Muh")

#===============================================================================
#Create Horizontal Tab
horTabWidget        = QtGui.QTabWidget()
horTabWidget.setTabPosition(QtGui.QTabWidget.North)
horTab1             = QtGui.QWidget()

#===============================================================================
#... and instert the Vertival tab into the horizonztal one
horTab1hbox         = QtGui.QHBoxLayout()
horTab1hbox.addWidget(verTabWidget)
horTab1.setLayout(horTab1hbox)
horTabWidget.addTab(horTab1, "Whatever")

#===============================================================================
myDialog.setCentralWidget(horTabWidget)
myDialog.show()
app.exec_()


Sincerely

German Aerospace Center
Member of the Helmholtz Association

Air Transportation Systems

Daniel Böhnke

Technische Universität Hamburg-Harburg
Blohmstraße 18
21079 Hamburg
Germany
Telephone 040 / 42878-4447
Telefax 040 / 42878-2979
E-mail mailto:[email protected]
Internet http://www.DLR.de/LK/<http://www.dlr.de/LK/>

_______________________________________________
PySide mailing list
[email protected]
http://lists.pyside.org/listinfo/pyside

Reply via email to