add demo
diff --git a/chatdialog.cpp b/chatdialog.cpp
new file mode 100644
index 0000000..c7d8725
--- /dev/null
+++ b/chatdialog.cpp
@@ -0,0 +1,9 @@
+#include <QtGui>
+#include "chatdialog.h"
+
+ChatDialog::ChatDialog(QWidget *parent)
+ : QDialog(parent)
+{
+ setupUi(this);
+ lineEdit->setFocusPolicy(Qt::StrongFocus);
+}
diff --git a/chatdialog.h b/chatdialog.h
new file mode 100644
index 0000000..401df9d
--- /dev/null
+++ b/chatdialog.h
@@ -0,0 +1,12 @@
+#ifndef CHATDIALOG_H
+#define CHATDIALOG_H
+#include "ui_chatdialog.h"
+
+class ChatDialog : public QDialog, private Ui::ChatDialog
+{
+ Q_OBJECT
+
+public:
+ ChatDialog(QWidget *parent = 0);
+};
+#endif
diff --git a/chatdialog.ui b/chatdialog.ui
new file mode 100644
index 0000000..ed466e7
--- /dev/null
+++ b/chatdialog.ui
@@ -0,0 +1,71 @@
+<ui version="4.0">
+ <class>ChatDialog</class>
+ <widget class="QDialog" name="ChatDialog">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>600</width>
+ <height>400</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>Sync Demo</string>
+ </property>
+ <layout class="QVBoxLayout">
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <item>
+ <layout class="QHBoxLayout">
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <item>
+ <widget class="QTextEdit" name="textEdit">
+ <property name="focusPolicy">
+ <enum>Qt::NoFocus</enum>
+ </property>
+ <property name="readOnly">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QListWidget" name="listWidget">
+ <property name="focusPolicy">
+ <enum>Qt::NoFocus</enum>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout">
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <item>
+ <widget class="QLabel" name="label">
+ <property name="text">
+ <string>Message:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLineEdit" name="lineEdit" />
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
+
diff --git a/main.cpp b/main.cpp
new file mode 100644
index 0000000..8f24743
--- /dev/null
+++ b/main.cpp
@@ -0,0 +1,11 @@
+#include<QApplication>
+#include "chatdialog.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+
+ ChatDialog dialog;
+ dialog.show();
+ return app.exec();
+}
diff --git a/sync-demo.pro b/sync-demo.pro
new file mode 100644
index 0000000..e912e77
--- /dev/null
+++ b/sync-demo.pro
@@ -0,0 +1,15 @@
+TEMPLATE = app
+TARGET = sync-demo
+HEADERS = chatdialog.h
+
+SOURCES = main.cpp \
+ chatdialog.cpp
+
+FORMS = chatdialog.ui
+
+
+QMAKE_LIBDIR *= /opt/local/lib /usr/local/lib /usr/lib
+INCLUDEPATH *= /opt/local/include /usr/local/include
+LIBS *= -lccn -lssl -lcrypto
+CONFIG += console
+