Qt-interest Archive, March 2003
sleep() in a non-threaded class?
Message 1 in thread
Hi all!
Is it possible to use the sleep() function in a non-threaded (= no QThread
inheritance) class?
Thanks!
--
[ signature omitted ]
Message 2 in thread
On March 21, 2003 12:01 pm, Peter Billen wrote:
> Hi all!
>
> Is it possible to use the sleep() function in a non-threaded (= no
> QThread inheritance) class?
You can certainly use sleep(3), at least on Linux.
Message 3 in thread
Yup, that's an option, but I want to keep my application cross platform.
So in other words, I'd like to use the QThread::sleep() function, but that
doesn't seem to work.
Any ideas that would work on both linux and windows?
Thanks!
--
[ signature omitted ]
Message 4 in thread
sleep isn't a good idea if you got a GUI. I am guessing this is why
Trolltech hasn't put a sleep function for single threaded applications.
If you need something to be done x seconds later, use a qtimer.
Minh
----- Original Message -----
From: "Peter Billen" <peter-qt@clueless.be>
To: "Chris Thompson" <chris@hypocrite.org>
Cc: <qt-interest@trolltech.com>
Sent: Saturday, March 22, 2003 6:53 PM
Subject: Re: sleep() in a non-threaded class?
> Yup, that's an option, but I want to keep my application cross platform.
>
> So in other words, I'd like to use the QThread::sleep() function, but that
> doesn't seem to work.
>
> Any ideas that would work on both linux and windows?
>
> Thanks!
>
> --
> Peter
>
>
> Citeren Chris Thompson <chris@hypocrite.org>:
>
> > On March 21, 2003 12:01 pm, Peter Billen wrote:
> > > Hi all!
> > >
> > > Is it possible to use the sleep() function in a non-threaded (= no
> > > QThread inheritance) class?
> >
> > You can certainly use sleep(3), at least on Linux.
> >
> >
>
> --
> List archive and information: http://lists.trolltech.com/qt-interest/
Message 5 in thread
I would expect that your UI won't update or respond to
events during the sleep period though.
>X-Loop: qt-interest
>From: Chris Thompson <chris@hypocrite.org>
>To: peter-qt@clueless.be, qt-interest@trolltech.com
>Subject: Re: sleep() in a non-threaded class?
>Date: Fri, 21 Mar 2003 14:53:27 -0700
>User-Agent: KMail/1.5.1
>MIME-Version: 1.0
>Content-Transfer-Encoding: 7bit
>Content-Disposition: inline
>
>On March 21, 2003 12:01 pm, Peter Billen wrote:
>> Hi all!
>>
>> Is it possible to use the sleep() function in a non-threaded (= no
>> QThread inheritance) class?
>
>You can certainly use sleep(3), at least on Linux.
>
>--
>List archive and information: http://lists.trolltech.com/qt-interest/
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Peter Valle
Exa Corporation
valle@exa.com
781-676-8545