[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mozilla-qt
Subject:    running qt/embedded
From:       ivpfmc28 () yahoo ! com (nick_faye)
Date:       2004-02-17 9:50:47
Message-ID: 8a5e9892.0402170150.625097b4 () posting ! google ! com
[Download RAW message or body]

hi guys,
    i hope someone here has encountered the same problem we do.  we
are trying to evaluate the qt/em 2.3.7 on our target system.  we had
successfully cross compiled the qt library and binaries.  but when we
tried running the sample codes of the qt/e, our system halts.  when we
tried running these lines of code:


#include <qapplication.h>
#include <qpushbutton.h>
#include <qfont.h>
#include <stdio.h>

int main( int argc, char **argv )
{
    char cChar;
    printf("Continue? (y/n)\n");
    fflush(stdin);
    scanf("%c", &cChar);
    if(cChar == 'n'){
        printf("You selected NO.\n");
        return 0;
    }
    else{
            QApplication a( argc, argv );
            printf("FINISHED QAPPLICATION\n");

            QPushButton quit( "Quit", 0 );
            printf("QUIT BUTTON CREATED\n");
            quit.resize( 75, 30 );
            quit.setFont( QFont( "Times", 18, QFont::Bold ) );

            QObject::connect( &quit, SIGNAL(clicked()), &a,
SLOT(quit()) );
            printf("CLICKED SIGNAL CONNECTED TO QUIT SLOT\n");

            a.setMainWidget( &quit );
            printf("ABOUT TO CALL QUIT.SHOW\n");
            quit.show();
            printf("ABOUT TO EXIT\n");
            return 0;
            return a.exec();
    }
} 
the string "Continue (y/n)" was not even displayed and the system
hangs.  But when we tried commenting out all the else{} block, the
printf's worked just fine.  Any hint?  Please?  Thank you

nick_faye
_______________________________________________
Mozilla-qt mailing list
Mozilla-qt@mozilla.org
http://mail.mozilla.org/listinfo/mozilla-qt
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic