Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 3

Qt-interest Archive, July 2007
Color Fading


Message 1 in thread

  
hi
in my project i have two threads on thread doing the working of displaying the forms and another thread is reading data from the socket, actually its a client/server architecture, server is doing the work of displaying the forms and client request for displaying particular form to be displayed on server. I m using QCustomEvent for handling the client request.
i m facing a problem of color fading in the GUI of my project and its happening whenever there is no user input for around 5 minutes .
whenever color is fading then i have to reboot my PC otherwise no widget will be display .
so tell me what i should do 

best regards
sanjeev

Message 2 in thread

sanjeev kumar schrieb:
>  
> hi
> ...
> whenever color is fading then i have to reboot my PC otherwise no widget 
> will be display .
> so tell me what i should do

Maybe it's time to repaint your PC? Personally I like blue very much...

;)

No honestly, what /exactly/ is fading? Which colour? The whole screen? 
Just your application? Why and how is it fading?? Are /you/ implememting 
a colour fade on purpose, or is this happening by mistake? Are all 
applications concerned, or just your Qt application? Etc. etc.

Btw: Are you sure it's not just your screen safer kicking in after 5 
minutes? ;)

Cheers, oliver

--
 [ signature omitted ] 

Message 3 in thread

 the color fading i mean to say that
suppose i have form which consist of a OK pushbutton and Cancel Pushbutton and a Label so whenever this kind of problem is occuring the written text in Pushbutton and Label is disappeari after 5 minute
i m using QPalette for providing color to my Pushbuttons and Labels
this is happening to my qt applications



On Mon, 16 Jul 2007 Till Oliver Knoll wrote :
>sanjeev kumar schrieb:
>>  hi
>>...
>>whenever color is fading then i have to reboot my PC otherwise no widget will be display .
>>so tell me what i should do
>
>Maybe it's time to repaint your PC? Personally I like blue very much...
>
>;)
>
>No honestly, what /exactly/ is fading? Which colour? The whole screen? Just your application? Why and how is it fading?? Are /you/ implememting a colour fade on purpose, or is this happening by mistake? Are all applications concerned, or just your Qt application? Etc. etc.
>
>Btw: Are you sure it's not just your screen safer kicking in after 5 minutes? ;)
>
>Cheers, oliver
>
>--
>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/
>

Message 4 in thread

sanjeev kumar schrieb:
>   the color fading i mean to say that
> suppose i have form which consist of a OK pushbutton and Cancel 
> Pushbutton and a Label so whenever this kind of problem is occuring the 
> written text in Pushbutton and Label is disappeari after 5 minute
> i m using QPalette for providing color to my Pushbuttons and Labels

So you are explicitly setting the foreground colour of your 
QPushButtons? Are you setting these from one of the aforementioned 
threads? If so, could it not simply be an implementation bug on your 
side? And maybe it's not the colour which is fading, but you are somehow 
resetting the QPushButton text etc. to ""?

Are you repeating a special task every 5 minutes, or why does that 
happen after 5 minutes? Do you use QTimers somewhere?

You really have to give us a bit more details about what exactly you 
/want/ to do and what you are actually doing.

Else it sounds like "Help! My application crashes! Help me fix it!"

> this is happening to my qt applications

And why is it you have to reboot your whole machine when it is simply 
the text from QPushButtons, QLabels etc. which is disappearing? Seems a 
bit cruel to me ;)

Cheers, Oliver


--
 [ signature omitted ] 

Message 5 in thread

  
as i told u that color is fading after 5 minutes or so but this is not the case every time whenever sometimes it happening in 1 minute or 2 minute
and each forms is corresponding to a particular class for example
class form1
class form2
...........
and i am setting the OPalette color in the constructor of the form
explicitly
so the displaying thread is creating the forms dynamically and calling
form->show for displaying 
and the problem is not just disappearing of the text from the Pushbutton
in the case of Qspinbox the up and down arrow is also disappearing after some time
i do not know why its happening so plz help me
best regards
sanjeev


On Mon, 16 Jul 2007 Till Oliver Knoll wrote :
>sanjeev kumar schrieb:
>>   the color fading i mean to say that
>>suppose i have form which consist of a OK pushbutton and Cancel Pushbutton and a Label so whenever this kind of problem is occuring the written text in Pushbutton and Label is disappeari after 5 minute
>>i m using QPalette for providing color to my Pushbuttons and Labels
>
>So you are explicitly setting the foreground colour of your QPushButtons? Are you setting these from one of the aforementioned threads? If so, could it not simply be an implementation bug on your side? And maybe it's not the colour which is fading, but you are somehow resetting the QPushButton text etc. to ""?
>
>Are you repeating a special task every 5 minutes, or why does that happen after 5 minutes? Do you use QTimers somewhere?
>
>You really have to give us a bit more details about what exactly you /want/ to do and what you are actually doing.
>
>Else it sounds like "Help! My application crashes! Help me fix it!"
>
>>this is happening to my qt applications
>
>And why is it you have to reboot your whole machine when it is simply the text from QPushButtons, QLabels etc. which is disappearing? Seems a bit cruel to me ;)
>
>Cheers, Oliver
>
>
>--
>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/
>

Message 6 in thread

Hi,

> as i told u that color is fading after 5 minutes or so but this is not 
> the case every time whenever sometimes it happening in 1 minute or 2 minute
> and each forms is corresponding to a particular class for example
> class form1
> class form2
> ...........
> and i am setting the OPalette color in the constructor of the form
> explicitly
> so the displaying thread is creating the forms dynamically and calling
> form->show for displaying

The displaying thread? Is teh displaying thread also the main thread?

> and the problem is not just disappearing of the text from the Pushbutton
> in the case of Qspinbox the up and down arrow is also disappearing after 
> some time
> i do not know why its happening so plz help me

Could you provide a compilable minimal example?

It's hard to tell what's going wrong; as pointed out by Oliver it sounds like 
"Help! My application crashes! Help me fix it!" We need more details.

--
 [ signature omitted ] 

Message 7 in thread

sanjeev kumar schrieb:
>  
> as i told u that color is fading after 5 minutes or so

Yes, you told us already - but it still does not help very much in 
providing details on:

a) what you are trying to do
b) what you are actually doing

For example, do you use a QTimer which triggers some action every 5 
minutes? Are you setting the QPalette somewhere else in your code?

> but this is not 
> the case every time whenever sometimes it happening in 1 minute or 2 minute

Sounds like you are changing your display data in a way that it gets 
properly re-initialised by this action (whatever "whenever sometimes 
(something?) it happening" is). But if nothing happens your application 
destroys the widget data in some way.

Really, we need more details.

> and each forms is corresponding to a particular class for example
> class form1
> class form2

So what is /this/ supposed to tell us? It's like you would write "Hey, 
my program crashes. But somewhere in my code it sais 'int foo = 42;'. 
Could you help me please?" See what I mean?

> ...........
> and i am setting the OPalette color in the constructor of the form
> explicitly
> so the displaying thread is creating the forms dynamically and calling
> form->show for displaying

What's the "displaying thread"? The main thread or some other (worker) 
thread? If it is *not* the main (aka GUI) thread then this is wrong from 
the very beginning!

> and the problem is not just disappearing of the text from the Pushbutton
> in the case of Qspinbox the up and down arrow is also disappearing after 
> some time

And as I understood QLabels are also affected. I suspect that you 
display/update your widgets from within a non-GUI thread, see above.

> i do not know why its happening so plz help me

We don't know either /what/ is happening. You did not tell us so far. Sorry.


Cheers, Oliver

p.s. If you really expect a better answer than this, really give us a 
/small/ example which demonstrates what you are trying to do; best is if 
it even compiles. Give us feedback why you think it happens after 5 
minutes (QTimer? Some other server/client interaction, e.g. a "wake-up 
call", "keep-alive" or the like?). Answer the question whether you are 
updating the widgets in a GUI or non-GUI thread.

--
 [ signature omitted ] 

Message 8 in thread

  
a) what you are trying to do ?
Ans. i have to display the form at the server site and i am getting request from the client to display a particular form and the object of these forms i m creating dynamically.

b)what you are actually doing ?
Ans. One more thing that i want tell u what i have observed since last seven days .
the thread Called Socket Controller who is receiving request from client, is also responsible for sending one message after every 10 seconds to on of the process which is running at the server lets say this message 'Alive_Id', so this thread writing this Message 'Alive_id' on message queue
if i am not sending or writing any message to message queue every 10 secs then my code is working find .
i am using signal() and Alarm() and sigaction for setting the 10 secs
alarm.so i m doing signal handling
and i m using Posix message queue
so i want to know is it the problem of Message queue or Alarm(10)

thanks in advance
best regards
sanjeev

On Tue, 17 Jul 2007 Till Oliver Knoll wrote :
>sanjeev kumar schrieb:
>>  as i told u that color is fading after 5 minutes or so
>
>Yes, you told us already - but it still does not help very much in providing details on:
>
>a) what you are trying to do
>b) what you are actually doing
>
>For example, do you use a QTimer which triggers some action every 5 minutes? Are you setting the QPalette somewhere else in your code?
>
>>but this is not the case every time whenever sometimes it happening in 1 minute or 2 minute
>
>Sounds like you are changing your display data in a way that it gets properly re-initialised by this action (whatever "whenever sometimes (something?) it happening" is). But if nothing happens your application destroys the widget data in some way.
>
>Really, we need more details.
>
>>and each forms is corresponding to a particular class for example
>>class form1
>>class form2
>
>So what is /this/ supposed to tell us? It's like you would write "Hey, my program crashes. But somewhere in my code it sais 'int foo = 42;'. Could you help me please?" See what I mean?
>
>>...........
>>and i am setting the OPalette color in the constructor of the form
>>explicitly
>>so the displaying thread is creating the forms dynamically and calling
>>form->show for displaying
>
>What's the "displaying thread"? The main thread or some other (worker) thread? If it is *not* the main (aka GUI) thread then this is wrong from the very beginning!
>
>>and the problem is not just disappearing of the text from the Pushbutton
>>in the case of Qspinbox the up and down arrow is also disappearing after some time
>
>And as I understood QLabels are also affected. I suspect that you display/update your widgets from within a non-GUI thread, see above.
>
>>i do not know why its happening so plz help me
>
>We don't know either /what/ is happening. You did not tell us so far. Sorry.
>
>
>Cheers, Oliver
>
>p.s. If you really expect a better answer than this, really give us a /small/ example which demonstrates what you are trying to do; best is if it even compiles. Give us feedback why you think it happens after 5 minutes (QTimer? Some other server/client interaction, e.g. a "wake-up call", "keep-alive" or the like?). Answer the question whether you are updating the widgets in a GUI or non-GUI thread.
>
>--
>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/
>