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

Qt-interest Archive, July 2006
Active window


Message 1 in thread

Hi,

I'm using Qt v4.1.1 - open source - and when a program starts my little 
QMainWindow widget it goes behind it, using windows xp...

 I didn't change much in the main window properties and not sure how to 
make it the active window: further I wanna make my program come forward 
to the user when certain events occure. I tried a couple of member 
functions like show() and activeWindow() and didn't change the 
behaviour, am I missing something here?


here's my main function,

    QApplication App( argc, argv );

    QTranslator Translator( 0 );
    Translator.load( "sysid_fr", "." );
    App.installTranslator( &Translator );

    main_dialog Main;
    Main.show();

    App.connect( &App, SIGNAL( lastWindowClosed() ), &App, SLOT( quit() ) );
    return App.exec();


Thanks in advanced,
Dee

Message 2 in thread

Daher wrote:

> here's my main function,
> 
>    QApplication App( argc, argv );
> 
>    QTranslator Translator( 0 );
>    Translator.load( "sysid_fr", "." );
>    App.installTranslator( &Translator );
> 
>    main_dialog Main;
>    Main.show();
/* try adding following code after this line */
	Main.raise();
	Main.setAcitveWidget();

--
 [ signature omitted ]