Discussion Board

Results 1 to 3 of 3
  1. #1
    Regular Contributor
    Join Date
    Nov 2011

    Thumbs up What i need to correct so that i can get my text displayed?

    Hi here is my code:I like to display the text in a dialog box

    #include "mainwindow.h"

    #include <QtGui/QApplication>

    int main(int argc, char *argv[])
    QApplication app(argc, argv);

    QDialog dialog;
    QString temp = QObject::tr("dadasda");

    QString romeo = QObject::tr(
    "But soft, what light through yonder window breaks? / "
    "It is the east, and Juliet is the sun. / "
    "Arise, fair sun, and kill the envious moon, / "
    "Who is already sick and pale with grief / "
    "That thou, her maid, art far more fair than she."


    return app.exec();

    The program runs but displays only the dialog box and not the text that i like to display..
    Can anyone point out where i had done the mistake and what is the wrong in my code so that i will be getting my text displayed.

    Thank you in advance...

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2003

    Re: What i need to correct so that i can get my text displayed?

    basically you are just defining strings and not using them in the dialog, thus how would you think that they would magically appear in there. anyway maybe you could try QMessageBox instead, here's one example for it: http://www.developer.nokia.com/Commu...sage_box_in_Qt

  3. #3
    Regular Contributor
    Join Date
    Nov 2011

    Re: What i need to correct so that i can get my text displayed?

    Thank you for your reply one thing i forget to mention is i am new to Qt...

    I will try with message box and i am working to display the text in a tool none other than message box.

    Thank you for ur reply once again.

Similar Threads

  1. Text displayed backwards
    By pinkhardlionel in forum Symbian User Interface
    Replies: 1
    Last Post: 2009-07-22, 17:32
  2. Text/Smiley not getting displayed when a message is sent
    By nagesh.chetana in forum Mobile Java General
    Replies: 12
    Last Post: 2008-12-22, 10:15
  3. Text isn't displayed properly
    By schnesim in forum Symbian
    Replies: 21
    Last Post: 2008-06-28, 08:59
  4. Number of rows of text displayed?
    By sridhar270 in forum General Development Questions
    Replies: 0
    Last Post: 2006-07-07, 07:55
  5. how to get text displayed on the screen?
    By yangym_2000 in forum Symbian
    Replies: 3
    Last Post: 2004-04-09, 12:36

Posting Permissions

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