Improved spacing for UI

This commit is contained in:
Bastian Kleineidam 2009-03-07 14:02:32 +01:00
parent ede5654c85
commit cb5444c35a
3 changed files with 27 additions and 1 deletions

View file

@ -2,7 +2,7 @@
# Form implementation generated from reading ui file 'ui/main.ui'
#
# Created: Sat Mar 7 13:38:10 2009
# Created: Sat Mar 7 13:54:20 2009
# by: PyQt4 UI code generator 4.4.4
#
# WARNING! All changes made in this file will be lost!
@ -24,6 +24,8 @@ class Ui_MainWindow(object):
self.centralwidget = QtGui.QWidget(MainWindow)
self.centralwidget.setObjectName("centralwidget")
self.gridLayout = QtGui.QGridLayout(self.centralwidget)
self.gridLayout.setMargin(4)
self.gridLayout.setVerticalSpacing(3)
self.gridLayout.setObjectName("gridLayout")
self.label = QtGui.QLabel(self.centralwidget)
self.label.setObjectName("label")

15
linkcheck/gui/t.py Normal file
View file

@ -0,0 +1,15 @@
def on_treeWidget_customContextMenuRequested (self, point):
print "XXX", point, self.treeWidget.mapToGlobal(point)
item = self.treeWidget.itemAt(point)
if item is not None:
# show menu
menu = QtGui.QMenu(self.treeWidget)
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap(":/icons/online.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
action = menu.addAction(icon, _("&View Online"))
self.connect(action, QtCore.SIGNAL("triggered()"), self.item_view_online)
menu.exec_(self.treeWidget.mapToGlobal(point))
def item_view_online (self):
print "XXX view online"

View file

@ -27,6 +27,15 @@
</property>
<widget class="QWidget" name="centralwidget" >
<layout class="QGridLayout" name="gridLayout" >
<property name="horizontalSpacing" >
<number>-1</number>
</property>
<property name="verticalSpacing" >
<number>3</number>
</property>
<property name="margin" >
<number>4</number>
</property>
<item row="0" column="0" >
<widget class="QLabel" name="label" >
<property name="text" >