what does not work ???
{
Q_OBJECT
public:
~CWorkThread();
void run();
public slots:
void FinishProc();
};
class CWorkThread : public QThread
{
Q_OBJECT
public:
CWorkThread(QObject *parent);
~CWorkThread();
void run();
public slots:
void FinishProc();
};
To copy to clipboard, switch view to plain text mode
void CWorkThread::run()
{
CWorkFiles *files = new CWorkFiles;
connect(files,SIGNAL(finished()),this,SLOT(FinishProc()));
exec();
}
void CWorkThread::run()
{
CWorkFiles *files = new CWorkFiles;
connect(files,SIGNAL(finished()),this,SLOT(FinishProc()));
QApplication::beep();
exec();
}
To copy to clipboard, switch view to plain text mode
this block newer running !
void CWorkThread::FinishProc()
{
}
void CWorkThread::FinishProc()
{
QApplication::beep();
}
To copy to clipboard, switch view to plain text mode
--------------------------
class CWorkFiles
: public QFile{
Q_OBJECT
public:
~CWorkFiles();
qint16 IsFileExists
(QString cPath
);
signals:
void finished();
};
class CWorkFiles : public QFile
{
Q_OBJECT
public:
CWorkFiles(QObject *parent = 0);
~CWorkFiles();
qint16 CopyFile(QString cSrc, QString cDst);
qint16 MoveFile(QString cSrc, QString cDst);
qint16 DeleteFile(QString cPath);
qint16 IsFileExists(QString cPath);
signals:
void finished();
};
To copy to clipboard, switch view to plain text mode
{
emit finished();
return 1;
}
qint16 CWorkFiles::CopyFile(QString cSrc, QString cDst)
{
emit finished();
return 1;
}
To copy to clipboard, switch view to plain text mode
Bookmarks