Скажите, почему вот это не работает и программа вылетает?
- Код: Выделить всё
void MainWindow::displaySocketStateOnStatusBar(QAbstractSocket::SocketState socketState)
{
/* switch (socketState)
{
case QAbstractSocket::UnconnectedState:
ui->statusBar->showMessage("Not connected");
break;
case QAbstractSocket::HostLookupState:
ui->statusBar->showMessage("Looking up host...");
break;
case QAbstractSocket::ConnectingState:
ui->statusBar->showMessage("Connecting to host...");
break;
case QAbstractSocket::ConnectedState:
ui->statusBar->showMessage("Connected to host");
break;
case QAbstractSocket::BoundState:
ui->statusBar->showMessage("Bound");
break;
case QAbstractSocket::ClosingState:
ui->statusBar->showMessage("Closing current connection...");
break;
case QAbstractSocket::ListeningState:
ui->statusBar->showMessage("Listening...");
break;
}
*/
}