Hmm it is very complicated to show you some code, especially for the QDialog.
But here are some stuff which can help:
How i connect the thread to the PBar (From my QDialog):
connect( thrdProcessing, SIGNAL(percentDone(int)), prgBrCoreStatus, SLOT(setPercentage(int)) );
connect( thrdProcessing, SIGNAL(stepDone(int, int)), prgBrCoreStatus, SLOT(setStep(int, int)) );
connect( thrdProcessing, SIGNAL(percentDone(int)), prgBrCoreStatus, SLOT(setPercentage(int)) );
connect( thrdProcessing, SIGNAL(stepDone(int, int)), prgBrCoreStatus, SLOT(setStep(int, int)) );
To copy to clipboard, switch view to plain text mode
How i start the thread (From my QDialog):
if (!thrdProcessing->isRunning()) {
// Start the core...
thrdProcessing->start();
} else
setWindowTitle(tr("The core is already running."));
if (!thrdProcessing->isRunning()) {
// Start the core...
thrdProcessing->start();
} else
setWindowTitle(tr("The core is already running."));
To copy to clipboard, switch view to plain text mode
Also, attached is the full source code of my PBar.
Thanks a lot again Marcel ![Smile](images/smilies/smile.png)
Pierre
[EDIT:] FYI: The two attached files have been made with Visual Studio... under Windows. i recommend you to set the tabs space to 4 if you're using Kdevelop, i had this issue earlier
Bookmarks