예제 #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
파일: main.cpp 프로젝트: ticano/TimeSheet
int main(int argc, char *argv[])
{
    QApplication a(argc, argv);

    Timesheet timesheet;
    timesheet.show();

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

    return a.exec();
}