Respected list
I am bit new to qt. so please help me and correct some of my mistakes.
I am trying to create simple tcp client but I am unable to do so. below is my code. when i try to compile it gives me error
“/opt/QT Projects/test/dialog.cpp:-1: error: undefined reference to `QTcpSocket::QTcpSocket(QObject*)’”
please tell me whats wrong?
#include “dialog.h”
#include “ui_dialog.h”
#include <QtNetwork/QTcpSocket>
#include <QtNetwork/QTcpServer>
#include<QtNetwork/QNetworkSession>
Dialog::Dialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::Dialog),networkSession(0)
{
ui->setupUi(this);
QTcpSocket *tcpSocket1=new QTcpSocket (this);
}
Dialog::~Dialog()
{
delete ui;
}
↧