Results 1 to 4 of 4

Thread: QString::arg: Argument missing

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Aug 2009
    Location
    coimbatore,India
    Posts
    314
    Thanks
    37
    Thanked 47 Times in 43 Posts
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default QString::arg: Argument missing

    hi,
    I'm using linguist to translate the following, (environment: ubuntu,qt4.7)
    Qt Code:
    1. MainWindow::MainWindow(QWidget *parent) :
    2. QMainWindow(parent),
    3. ui(new Ui::MainWindow)
    4. {
    5. QTranslator translator;
    6. QString txt1="text";
    7. translator.load("testLang");
    8. qApp->installTranslator(&translator);
    9. ui->setupUi(this);
    10. l=new QLabel(this);
    11. l->setText(tr("file %1").arg(txt1));
    12. }
    To copy to clipboard, switch view to plain text mode 

    But I'm getting the following warning:
    QString::arg: Argument missing: test translatedText, text
    (translatedText: The text translated in the target language.)
    what's the possible cause , how can i get rid of this?
    Thanks in advance.
    Bala
    Last edited by BalaQT; 4th May 2011 at 11:59.

Similar Threads

  1. Replies: 3
    Last Post: 8th April 2011, 16:44
  2. argument parsing
    By deeee in forum Qt Programming
    Replies: 1
    Last Post: 26th May 2010, 22:21
  3. Error "QString::arg: Argument missing"
    By Lawand in forum Qt Programming
    Replies: 3
    Last Post: 18th February 2009, 20:26
  4. Replies: 4
    Last Post: 31st January 2008, 20:44
  5. Warning QString::arg() argument missing
    By quickNitin in forum Newbie
    Replies: 9
    Last Post: 16th November 2006, 19:13

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.