Il 18/04/2013 23.43, Zoran Sibinovic ha scritto:
> Hi dmajkic,
>
> that's ok, I can try with a thread, but, with a use of
> hb_threadStart() or some Qt thread class ?
>
> I haven't found some in QTContribs
>
Hi Zoran.
IMHO, if you are started to use hbqt, in other words Qt, I suggest to
you to stay away from multi thread because if is the "first time" you
use Qt you have a lot to read, understand.
First of all remember that you will work with GUI as Dusan remember to you.
Prorbaly, you need to configure your QProgressdialog to wait an infinite
loop, btu you must "customize" your object.
ie:
QProgessDialog:setMinimumDuration( 0 )
oQtProgressBar := QProgressBar( <progressDialog as parent> )
oQtProgressBar:setRange( 0, 0 )
oQtProgressBar:setValue( 0 )
QProgressDialog:setBar( oQtProgressBar )
.... and know you need a QTimer object to be connected to update progressBar
With your customized object you can use this code
LOCAL oMyCustomizedObject
oMyCustomizedObject:show()
WHILE .T.
QApplication:processEvents() // most important to avoid GUI freezing
IF oMyCustomizedObject:wasCancelled()
EXIT
ELSE
Do something code
ENDIF
END
.....
So what I want say to you, as Pritpal and Francesco write, Qt is very
"complex" and it has a lot of "properties", usage and related manging.
When I start to use hbqt, in other words Qt, I follow many examples on
internet and I replicate them with hbqt.....
This link can be one to read
http://www.qtcentre.org/archive/index.php/t-45782.html?s=4c07902b64dca4173572b22a9bba127a
I think it's very difficult to have all the examples (or solutions)
within hbqt/qtcontribs folders
@Pritpal what is the right project "name / reference" ? :)
Luigi Ferraris