[Qt-interest] Focus on a hidden widget.

suma s suma_s27 at yahoo.co.in
Thu Mar 10 05:31:35 CET 2011


hai...
even i am facing the same kind of problem...
currently i have an application, which uses table widget property of QT... that is developed using QT creator.. the application runs well on my linux PC... now i have cross compiled it for MIPS..
now that.. the application is behaving weirdly...my application(say app2) actually gets  launched by one more application, which was running initially(say app1)..once my application is launched(app2).. it must actually be displayed on the screen directly..but.. wat actually happening is...my application (app2) is getting displayed on the background of the currently running application(app1)... because of which.. app2 is unable to recieve any of the keyboard events....
when i worked around this... came to know that.. my application window might not be recieving the focus.. bcoz of which its getting displayed on the background....
so i just wanted to know.. how to make my window focused???.. - i tried giving.. requestFocus() at the QT level after Createwindow() and setopacity().. so that it can be applied for all the applications.. but it actually dint work...:(
- so i thought of giving focus at the application level.. i mean.. directly to my appliacation..but dont know.. how actually should i proceed with this... so need ur help...
any suggestions or advice is most welcome...thanks in advance...--------

Regards

Suma

--- On Wed, 9/3/11, Kahola.g <kahola.g at gmail.com> wrote:

From: Kahola.g <kahola.g at gmail.com>
Subject: [Qt-interest] Focus on a hidden widget.
To: qt-interest at qt.nokia.com
Date: Wednesday, 9 March, 2011, 9:27 PM



    
    
    
 
Hi



I am facing a very peculiar problem. My widget is not getting focus.

When i create the widget i call following two functions on it

show()

setFocus()



this kind of code used to work. But all of a sudden i am in a situation where it doesnt seem to work. As I understand " if set focus is called on a widget that is not shown yet, it will get focus as soon as it becomes visible". Am i wrong here?



--

kahola
 


-----Inline Attachment Follows-----

_______________________________________________
Qt-interest mailing list
Qt-interest at qt.nokia.com
http://lists.qt.nokia.com/mailman/listinfo/qt-interest


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110310/ec2771d4/attachment.html 


More information about the Qt-interest-old mailing list