PDA

View Full Version : Making a floatable widget in Qt



riarioriu3
9th July 2012, 06:35
In my aplication when there shall be some validation happens, i need a widget or messagebox kind of concept which will pop up in the RIGHT HAND SIDE BOTTOM of my application for some time (for 5-10 sec) , after that specific time it should disapper ..

for eg- when we are getting a mail in outlook some indication is being displayed in the rigt side corner .. i have to implment the same in my application ...
could you please give a small example on this ??

mvuori
9th July 2012, 07:26
Base your class on QWidget or QDialog.
Include in it a QTimer variable.
In the constructor link the timer's timeout() signal to whatever action you wish (close, hide, move...).
Start your timer with your desired time value (timer->start(millisecs)).
Etc...

high_flyer
9th July 2012, 09:18
Why not just use a QToolTip ?

riarioriu3
9th July 2012, 10:50
But QToolTip cant be control by us right . when we are moving on that specific control only at that time QTollTip will be shown . But what i want is when some condition is satisfied , there shall be some thing happen which give some useful information to teh user ..(like outlook)

Please refer to the question being asked .

high_flyer
9th July 2012, 11:02
But QToolTip cant be control by us right .
Wrong.

when we are moving on that specific control only at that time QTollTip will be shown .
You can show a tool tip any time you want.


Please refer to the question being asked .
I have.

riarioriu3
9th July 2012, 11:31
is there any way to set stylesheet to tooltip ?

high_flyer
9th July 2012, 11:42
EDIT:
Yes you can:
http://doc.qt.nokia.com/4.7-snapshot/stylesheet-reference.html

But I still don't understand what is the problem you are having?
You can show any kind of widget at any given time anywhere on the screen.
So what exactly is the difficulty you are facing?

i need a widget or messagebox kind of concept which will pop up in the RIGHT HAND SIDE BOTTOM of my application for some time (for 5-10 sec) , after that specific time it should disapper ..
Ok, this is what you want to achieve.
But what is the problem?
Is it showing a widget?
Is it having it close after specific time?
Try to be clear about your problem.

riarioriu3
9th July 2012, 12:01
I can make you understand through the following example ,

e.g- In microsoft outlook when we are getting one mail at that time there is some notification message will pop up ( at the right hand side corner ) indicating that we have received one mail ...
The same thing i have to implement in my application .. In my application whenever the user is doing something wrong , i have to notify the user by giving one notification message ,in the same way i have mentioned above ..According to the customer requirement i cant use any messagebox here . i have to implement the same way it is being implemented in the microsoft outlook ..

I think now you can understand my problem statement ...

high_flyer
9th July 2012, 12:51
I think now you can understand my problem statement ...
No, because you are not explaining what your problem is, you are describing what you have to implement.
Again, what is the problem you are experiencing?
The problem is NOT what you want to implement, but what you tried and didn't work (for example).

riarioriu3
9th July 2012, 13:22
here my problem is , since i am new to Qt i dont know how to implement the above concept ..
Please give some help as soon as possible , so that it will be helpful for me ...


thankx in adv ...

high_flyer
9th July 2012, 13:39
here my problem is , since i am new to Qt i dont know how to implement the above concept
We can't help you with that.
We can help you with problem you encounter, we can't teach you what you should already know when asking questions here.
http://www.catb.org/~esr/faqs/smart-questions.html#explicit

RTFM, and then try to implement it.
When you have tried and encounter problems, come back and ask.


Please give some help as soon as possible
http://www.catb.org/~esr/faqs/smart-questions.html#urgent