[Qt-interest] QFile* threads
Thiago Macieira
thiago.macieira at trolltech.com
Mon Aug 3 08:30:57 CEST 2009
_h_ wrote:
>Hi Thiago Macieira,
>
>>>Can anybody explain, how following can be implemented in Qt...
>>>- allow to stop QFile threads temporarily when the QFileDialog is
>>>hidden and start them when QFileDialog shown again.
>>
>> You cannot do that. There's no API to do that.
>
>Is there any technical reason.
No. It's just that we didn't add the API. If we didn't add the API, it
doesn't exist.
It was never foreseen that someone might try to do what you're trying to
do. File dialogs were conceived to be created when needed and disposed of
shortly afterwards. I would argue that you're misusing the API by keeping
them around. When you misuse the API, you find out that it's unsuitable for
the task at hand.
In any case, the point is that you can't do what you've asked because
there's no API for that in Qt. So you have these options at this point:
a) live with it, letting these threads running
b) modify Qt to add an API that would let you stop the threads; you're on
your own in this case and we will not be able to help you
c) redesign your code so that you don't have the thread problem in the
first place
--
Thiago Macieira - thiago.macieira (AT) nokia.com
Senior Product Manager - Nokia, Qt Software
Sandakerveien 116, NO-0402 Oslo, Norway
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090803/17adca06/attachment.bin
More information about the Qt-interest-old
mailing list