#include <qftp.h>
#include <qapplication.h>
#include "test.h"
#include "ui_test.h"
#include <qfile.h>
int main()
{
QApplication a(argc, argv);
Test w;
ftp.connectToHost("192.168.26.129", 21);
w.show();
return a.exec();
}
I am new to Qt, ftp.connectToHost("192.168.26.129", 21)
works well from within main, but whenever called from class Test
, it fails (with same header inclusion ) as below.
Test::Test(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::Test)
{
ui->setupUi(this);
QFtp ftp;
int x = ftp.connectToHost("192.168.26.129", 21);
ftp.login("User1", "passwd");
}
Any suggestions would be helpful. Thanks!