better presentation
This commit is contained in:
parent
925278f82d
commit
ca39a32318
2 changed files with 12 additions and 9 deletions
|
|
@ -177,12 +177,10 @@ class ContactProfile(QWidget):
|
|||
elif isinstance(node.value, tuple):
|
||||
value = QLabel(', '.join([unicode(s) for s in node.value]))
|
||||
value.setWordWrap(True)
|
||||
elif isinstance(node.value, (str,unicode,int)):
|
||||
print '[%s]' % node.value
|
||||
elif isinstance(node.value, (str,unicode,int,long,float)):
|
||||
value = QLabel(unicode(node.value))
|
||||
|
||||
if not value:
|
||||
print 'no value :('
|
||||
else:
|
||||
logging.warning('Not supported value: %r' % node.value)
|
||||
return
|
||||
|
||||
# Insert the value widget into the parent widget, depending
|
||||
|
|
@ -195,8 +193,7 @@ class ContactProfile(QWidget):
|
|||
elif isinstance(widget.layout(), QVBoxLayout):
|
||||
widget.layout().addWidget(value)
|
||||
else:
|
||||
print 'TODO'
|
||||
return
|
||||
logging.warning('Not supported widget: %r' % widget)
|
||||
|
||||
class IGroup(object):
|
||||
def __init__(self, weboob, id, name):
|
||||
|
|
|
|||
|
|
@ -19,6 +19,12 @@
|
|||
</property>
|
||||
<item>
|
||||
<widget class="QScrollArea" name="scrollArea">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Plain</enum>
|
||||
</property>
|
||||
<property name="widgetResizable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
|
|
@ -27,8 +33,8 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>456</width>
|
||||
<height>316</height>
|
||||
<width>460</width>
|
||||
<height>320</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue