[Qt-interest] QApplication::Process
Mandeep Sandhu
mandeepsandhu.chd at gmail.com
Thu May 27 14:46:03 CEST 2010
On Thu, May 27, 2010 at 6:00 PM, Serge <mb0 at km.ru> wrote:
> Hello,
>
> I need to download a file via HTTP and display progressDialog.
> While file is downloaded procedure is waiting the end of download process:
>
> while (m_downloading)
> QApplication::processEvents();
Why do you want wait here?
You can connect the downloadProgress(qint64, qint64) SIGNAL of a
QNetworkReply to setValue(int) SLOT of your QProgressBar.
That should work for you.
HTH,
-mandeep
>
> this makes 90% processor use
>
> am i using wrong method?
> if i would use QEventLoop::loop, would it be better?
> Are there any alternatives?
>
> Thank you!
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
More information about the Qt-interest-old
mailing list