Пример #1
0
IrcClient::IrcClient(const QString &host, int port, const QString &channel, const QString &nick)
    : m_host(host), m_port(port), m_channel(channel), m_nick(nick)
{
    connect(this, SIGNAL(connected()), this, SLOT(slotLogin()));
    connect(this, SIGNAL(readyRead()), this, SLOT(slotHandleOutput()));
    connect(this, SIGNAL(error(QAbstractSocket::SocketError)),
            this, SLOT(slotError(QAbstractSocket::SocketError)));
    connectToHost(m_host, m_port);
}
Пример #2
0
int main(int argc, char *argv[])
{
    QApplication a(argc, argv);

    Timesheet timesheet;
    timesheet.show();

    QTimer::singleShot(0, &timesheet, SLOT(slotLogin()));

    return a.exec();
}