Qt-interest Archive, July 2007
connect and signal/slot
Message 1 in thread
hi,
We can use connect, to come in some slot when signal emits...like
connect(s,SIGNAL(readyRead()),this SLOT(sockRead()));
(s is my client socket object);
is there any alternative in qt-3.1 instead of connect....
Thanks and regards,
Niranjan
--
[ signature omitted ]
Message 2 in thread
On 7/31/07, Niranjan <niranjank@xxxxxxxxxxxx> wrote:
> hi,
>
> We can use connect, to come in some slot when signal emits...like
> connect(s,SIGNAL(readyRead()),this SLOT(sockRead()));
> (s is my client socket object);
>
> is there any alternative in qt-3.1 instead of connect....
You could try disconnect instead :)
What are you trying to achieve? What is the problem with connect?
--
[ signature omitted ]
Message 3 in thread
Hi,
Actually, i am using connect for calling sockRead slot when readyRead signal
comes. But sometimes, it will not come in sockRead slot even if data is
available on port and it comes immedietly when i do some event like moving a
mouse or pressing Alt-tab. Is there any solution?????
I am using QSocket in qt-3.1 on linux.
Thanks and regards,
Niranjan
On Tuesday 31 July 2007 15:16, Pavel Antokolsky aka Zigmar wrote:
> On 7/31/07, Niranjan <niranjank@xxxxxxxxxxxx> wrote:
> > hi,
> >
> > We can use connect, to come in some slot when signal emits...like
> > connect(s,SIGNAL(readyRead()),this SLOT(sockRead()));
> > (s is my client socket object);
> >
> > is there any alternative in qt-3.1 instead of connect....
>
> You could try disconnect instead :)
>
> What are you trying to achieve? What is the problem with connect?
>
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with
> "unsubscribe" in the subject or the body. List archive and information:
> http://lists.trolltech.com/qt-interest/
--
[ signature omitted ]
Message 4 in thread
> Actually, i am using connect for calling sockRead slot when readyRead
signal
> comes. But sometimes, it will not come in sockRead slot even if data is
> available on port and it comes immedietly when i do some event like
moving a
> mouse or pressing Alt-tab. Is there any solution?????
Are you using QSocket in a different thread? This would not be supported
by Qt 3.x.x. You should use it in main (GUI) thread. I assume you did
create a QApplication first and started an eventloop with
QApplication::exec() ... otherwise it would defenitely not work.
> I am using QSocket in qt-3.1 on linux.
Is there any reason for using such an old version? Did you try a newer one
i.e. 3.3.7?
Regards,
Malte
--
[ signature omitted ]