Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   C++ (http://www.velocityreviews.com/forums/f39-c.html)
-   -   QT: How to raise application from background? (http://www.velocityreviews.com/forums/t743953-qt-how-to-raise-application-from-background.html)

Szyk 02-21-2011 07:33 PM

QT: How to raise application from background?
 
Hi

I am writting kind of text editor program. So the main feature is
"running only one instance" and raising app from background when user
invoke it with file name as parameter. Already I have done comunication
via local socket (between already running app and new starting app), but
I have no idea how to raise it from background when it obtain file name
from socket. I use QWidget::raise() and QWidget::activateWindow() but it
does not work, the only effect is blinking program icon on task bar.

In other words I want the same behaviour (raise program from background)
as Chrome or any text editor when it is already running as "only one
instance" and when user invoke it with file name or URL as parameter.


Szyk

Rolf Magnus 02-23-2011 11:44 AM

Re: QT: How to raise application from background?
 
Qt isn't really the topic of this news group, because it's not part of
standard C++ so you should find another place for this type of questions in
the future.

Szyk wrote:

> Already I have done comunication via local socket (between already running
> app and new starting app), but I have no idea how to raise it from
> background when it obtain file name from socket. I use QWidget::raise()
> and QWidget::activateWindow() but it does not work, the only effect is
> blinking program icon on task bar.


What exactly do you mean by "raise it from background"? Putting it on top if
it's behind other windows? That's what raise() should do. Or do you want it
to get the focus? That's what activateWindow() does. Or do you mean to show
the window if it's currently minimized? That would be QWidget::show().



All times are GMT. The time now is 09:16 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.