: QWidget(parent
), chan
(name
), m_socket
(socket
) {
read->setReadOnly(true);
layout->addWidget(read);
layout->addWidget(write);
layout->addWidget(send);
setLayout(layout);
setWindowTitle(name.toLatin1());
connect(send, SIGNAL(clicked()), this, SLOT(sendM()));
read->append("Welcome to " + name + "\n");
}
Channel::Channel(QWidget* parent, const QString& name, QTcpSocket* socket)
: QWidget(parent), chan(name), m_socket(socket)
{
write = new QLineEdit;
read = new QTextEdit;
send = new QPushButton(tr("Send"));
read->setReadOnly(true);
QVBoxLayout* layout = new QVBoxLayout;
layout->addWidget(read);
layout->addWidget(write);
layout->addWidget(send);
setLayout(layout);
setWindowTitle(name.toLatin1());
connect(send, SIGNAL(clicked()), this, SLOT(sendM()));
read->append("Welcome to " + name + "\n");
}
To copy to clipboard, switch view to plain text mode
Bookmarks