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