summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2010-10-08 09:24:41 (GMT)
committerKevin Smith <git@kismith.co.uk>2010-10-08 09:24:41 (GMT)
commitdb39286d0f762d84f78a55bda6f70ea0d29229ba (patch)
treebd9fffcdb5324485c65e8342c36316b3e690dc07
parent58177796fa51784da5f10298a643f972164e6d07 (diff)
downloadswift-db39286d0f762d84f78a55bda6f70ea0d29229ba.zip
swift-db39286d0f762d84f78a55bda6f70ea0d29229ba.tar.bz2
Set the group window size appropriately.
Resolves: #593
-rw-r--r--Swift/QtUI/QtSetGroupsDialog.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/Swift/QtUI/QtSetGroupsDialog.cpp b/Swift/QtUI/QtSetGroupsDialog.cpp
index 82a71a1..959e9cd 100644
--- a/Swift/QtUI/QtSetGroupsDialog.cpp
+++ b/Swift/QtUI/QtSetGroupsDialog.cpp
@@ -18,12 +18,20 @@
namespace Swift {
QtSetGroupsDialog::QtSetGroupsDialog(ContactRosterItem* contact, const QList<QString>& allGroups) : contact_(contact) {
+ //resize(300,300);
+ setWindowTitle("Edit contact");
QBoxLayout* layout = new QBoxLayout(QBoxLayout::TopToBottom, this);
- QScrollArea* scroll = new QScrollArea(this);
- layout->addWidget(scroll);
+ setContentsMargins(0,0,0,0);
+ QScrollArea* scrollArea = new QScrollArea(this);
+ layout->addWidget(scrollArea);
+ scrollArea->setWidgetResizable(true);
+ scrollArea->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);
+ scrollArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAsNeeded);
+ QWidget* scroll = new QWidget(scrollArea);
+ scrollArea->setWidget(scroll);
QBoxLayout* scrollLayout = new QBoxLayout(QBoxLayout::TopToBottom, scroll);
QLabel* label = new QLabel(scroll);
- label->setText("Choose new groups for " + P2QSTRING(contact->getDisplayName()));
+ label->setText("Choose groups for " + P2QSTRING(contact->getDisplayName()));
scrollLayout->addWidget(label);
foreach (QString group, allGroups) {
QCheckBox* check = new QCheckBox(scroll);