From 0a03903b1df41f6395c539dd7050523190b3f3e0 Mon Sep 17 00:00:00 2001 From: Agnieszka Kostrzewa Date: Wed, 30 May 2012 14:24:46 +0200 Subject: [PATCH] QTableWidget items not editable any more --- qubesmanager/main.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/qubesmanager/main.py b/qubesmanager/main.py index 6087011..9054bf8 100755 --- a/qubesmanager/main.py +++ b/qubesmanager/main.py @@ -170,7 +170,7 @@ class VmLabelWidget(VmIconWidget): class VmNameItem (QTableWidgetItem): def __init__(self, vm): super(VmNameItem, self).__init__() - + self.setFlags(Qt.ItemIsSelectable|Qt.ItemIsEnabled) self.setText(vm.name) self.setTextAlignment(Qt.AlignVCenter) self.qid = vm.qid @@ -259,7 +259,8 @@ class VmInfoWidget (QWidget): class VmTemplateItem (QTableWidgetItem): def __init__(self, vm): super(VmTemplateItem, self).__init__() - + self.setFlags(Qt.ItemIsSelectable|Qt.ItemIsEnabled) + if vm.template is not None: self.setText(vm.template.name) else: @@ -285,6 +286,7 @@ class VmTemplateItem (QTableWidgetItem): class VmNetvmItem (QTableWidgetItem): def __init__(self, vm): super(VmNetvmItem, self).__init__() + self.setFlags(Qt.ItemIsSelectable|Qt.ItemIsEnabled) if vm.is_netvm() and not vm.is_proxyvm(): self.setText("n/a") @@ -535,6 +537,7 @@ class VmUpdateInfoWidget(QWidget): class VmSizeOnDiskItem (QTableWidgetItem): def __init__(self, vm): super(VmSizeOnDiskItem, self).__init__() + self.setFlags(Qt.ItemIsSelectable|Qt.ItemIsEnabled) self.vm = vm self.value = 0