sergey_85
18th October 2009, 17:54
Hi, I'am begginer in Qt!
I try to create template class for my projects, it will be do work in non gui thread (such as load file from www, get response from db and etc.)
My class has some specification:
- its must have 3 callback function (signals) using in gui thread
on_begin(QVariant data) // singal catched in gui form
on_progress(QVariant data) // singal catched in gui form
on_end(QVariant data) // singal catched in gui form
- and thread function. Here will be main work, for example loading file from www
on_work(QVariant data) //calling direct in thread run method!
Have you any ideas about it? How to make it?
PS: Sorry for grammatic errors!
I try to create template class for my projects, it will be do work in non gui thread (such as load file from www, get response from db and etc.)
My class has some specification:
- its must have 3 callback function (signals) using in gui thread
on_begin(QVariant data) // singal catched in gui form
on_progress(QVariant data) // singal catched in gui form
on_end(QVariant data) // singal catched in gui form
- and thread function. Here will be main work, for example loading file from www
on_work(QVariant data) //calling direct in thread run method!
Have you any ideas about it? How to make it?
PS: Sorry for grammatic errors!