Index: lc_qeditgroupsdialog.cpp
===================================================================
--- lc_qeditgroupsdialog.cpp	(revision 202)
+++ lc_qeditgroupsdialog.cpp	(working copy)
@@ -11,7 +11,11 @@
     QDialog(parent),
     ui(new Ui::lcQEditGroupsDialog)
 {
+	m_lastItemClicked = NULL;
+
 	ui->setupUi(this);
+	connect(ui->treeWidget,SIGNAL(itemClicked(QTreeWidgetItem *,int)), this, SLOT(onItemClicked(QTreeWidgetItem *,int)));
+	connect(ui->treeWidget,SIGNAL(itemDoubleClicked(QTreeWidgetItem *,int)), this, SLOT(onItemDoubleClicked(QTreeWidgetItem *,int)));
 
 	QPushButton *newGroup = ui->buttonBox->addButton(tr("New Group"), QDialogButtonBox::ActionRole);
 	connect(newGroup, SIGNAL(clicked()), this, SLOT(on_newGroup_clicked()));
@@ -48,10 +52,47 @@
 	options->GroupParents.Add(NULL);
 
 	QTreeWidgetItem *groupItem = new QTreeWidgetItem(currentItem, QStringList(newGroup->m_strName));
-	groupItem->setFlags(Qt::ItemIsSelectable | Qt::ItemIsUserCheckable | Qt::ItemIsEnabled | Qt::ItemIsDragEnabled | Qt::ItemIsDropEnabled);
+	groupItem->setFlags(Qt::ItemIsSelectable | Qt::ItemIsUserCheckable | Qt::ItemIsEnabled | Qt::ItemIsDragEnabled | Qt::ItemIsDropEnabled | Qt::ItemIsSelectable | Qt::ItemIsEditable);
 	groupItem->setData(0, GroupRole, qVariantFromValue<uintptr_t>((uintptr_t)newGroup));
 }
 
+void lcQEditGroupsDialog::onItemClicked(QTreeWidgetItem *item, int col)
+{
+	if (item->flags() & Qt::ItemIsEditable)
+	{
+		m_clickTimer.stop();
+
+		if (m_lastItemClicked != item)
+		{
+			m_lastItemClicked = item;
+			m_bEditableDoubleClicked = false;
+		}
+		else
+		{
+			m_clickTimer.start(QApplication::doubleClickInterval() + 50, this);
+		}
+	}
+}
+
+void lcQEditGroupsDialog::onItemDoubleClicked(QTreeWidgetItem *item, int col)
+{
+	if (item->flags() & Qt::ItemIsEditable)
+	{
+		m_bEditableDoubleClicked = true;
+	}
+}
+
+void lcQEditGroupsDialog::timerEvent(QTimerEvent *event)
+{
+	m_clickTimer.stop();
+	if (!m_bEditableDoubleClicked)
+	{
+		ui->treeWidget->editItem(m_lastItemClicked);
+	}
+
+	m_bEditableDoubleClicked = false;
+}
+
 void lcQEditGroupsDialog::updateParents(QTreeWidgetItem *parentItem, Group *parentGroup)
 {
 	Project *project = lcGetActiveProject();
@@ -78,6 +119,11 @@
 		{
 			Group *itemGroup = (Group*)childItem->data(0, GroupRole).value<uintptr_t>();
 
+			static const int cchGroupNameBuffer = sizeof(itemGroup->m_strName)/sizeof(itemGroup->m_strName[0]);
+			std::string groupName = childItem->text(0).toStdString();
+			if (strcmp(itemGroup->m_strName, groupName.c_str()))
+				strncpy(itemGroup->m_strName, groupName.c_str(), cchGroupNameBuffer);
+
 			int groupIndex = 0;
 			for (Group *group = project->m_pGroups; group; group = group->m_pNext, groupIndex++)
 			{
@@ -103,7 +149,7 @@
 			continue;
 
 		QTreeWidgetItem *groupItem = new QTreeWidgetItem(parentItem, QStringList(group->m_strName));
-		groupItem->setFlags(Qt::ItemIsSelectable | Qt::ItemIsUserCheckable | Qt::ItemIsEnabled | Qt::ItemIsDragEnabled | Qt::ItemIsDropEnabled);
+		groupItem->setFlags(Qt::ItemIsSelectable | Qt::ItemIsUserCheckable | Qt::ItemIsEnabled | Qt::ItemIsDragEnabled | Qt::ItemIsDropEnabled | Qt::ItemIsEditable);
 		groupItem->setData(0, GroupRole, qVariantFromValue<uintptr_t>((uintptr_t)group));
 
 		addChildren(groupItem, group);
Index: lc_qeditgroupsdialog.h
===================================================================
--- lc_qeditgroupsdialog.h	(revision 202)
+++ lc_qeditgroupsdialog.h	(working copy)
@@ -28,12 +28,20 @@
 public slots:
 	void accept();
 	void on_newGroup_clicked();
+	void onItemClicked(QTreeWidgetItem *item, int col);
+	void onItemDoubleClicked(QTreeWidgetItem *item, int col);
 
 private:
 	Ui::lcQEditGroupsDialog *ui;
 
 	void updateParents(QTreeWidgetItem *parentItem, Group *parentGroup);
 	void addChildren(QTreeWidgetItem *parentItem, Group *parentGroup);
+
+	void timerEvent(QTimerEvent *event);
+
+	QTreeWidgetItem*	m_lastItemClicked;
+	bool				m_bEditableDoubleClicked;
+	QBasicTimer			m_clickTimer;
 };
 
 #endif // LC_QEDITGROUPSDIALOG_H
