×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Nov 2010
    Posts
    40

    Message box not displaying as expected

    Code:
    void MessageBox::ShowMessageBox()
    {
    
    	QMessageBox msgBox;
    	msgBox.setText("Testing..");
    	msgBox.setIcon(QMessageBox::Information);
    	msgBox.setInformativeText("Just show infornation.");
    	msgBox.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel);
    	msgBox.setDefaultButton(QMessageBox::Ok);
    	int ret = msgBox.exec();
    	
    	 switch (ret) {
    	   case QMessageBox::Save:
    	       // Save was clicked
    	       break;
    	   case QMessageBox::Ok:
    	       // ok was clicked
    	       break;
    	   default:
    	       // should never be reached
    	       break;
    	 }
     
    }
    When I call the above method, a message box is displayed in the Nokia simulator as shown below:



    But I need the message box to be:
    1. Centered on the screen
    2. the button should appear in the message box and not at the bottom as menu buttons.

    Can anyone please help me fix this issue? The project code can be found here: download project.

    Thanks in advance for your help.

  2. #2
    Nokia Developer Expert
    Join Date
    Feb 2008
    Posts
    183

    Re: Message box not displaying as expected

    Simulator runs Qt app like it would be running on the desktop plus it has access to device theme graphics.
    Any other functionalities from Symbian (dialog positionings etc) Qt port are not simulated. So, please check the application in a real HW.

Similar Threads

  1. Displaying a message box from AIW provider
    By nayana22 in forum Symbian User Interface
    Replies: 1
    Last Post: 2008-10-30, 08:49
  2. how to updated the list box on dialog box before it is displaying it.
    By manjunaths in forum Symbian User Interface
    Replies: 3
    Last Post: 2008-03-20, 10:37
  3. Help on displaying a message box...
    By Psyve in forum Symbian C++
    Replies: 7
    Last Post: 2007-09-05, 08:32
  4. List Box is not displaying
    By sreejesh.tr in forum Symbian C++
    Replies: 2
    Last Post: 2005-08-18, 09:57
  5. Displaying a message box when application is in background
    By jntu_hareesh in forum Symbian User Interface
    Replies: 3
    Last Post: 2004-07-02, 07:28

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •