Results 1 to 2 of 2

Thread: QT_TR_NOOP doesnt work

  1. #1
    Join Date
    Jul 2012
    Posts
    20
    Thanks
    8
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4

    Default QT_TR_NOOP doesnt work

    I have this source:
    File stringconstant.h
    Qt Code:
    1. #include <QString>
    2. #include <QStringList>
    3. class StringConstant : public QObject
    4. {
    5. Q_OBJECT
    6. public:
    7. static const QStringList EXAMPLE_LIST;
    8. };
    To copy to clipboard, switch view to plain text mode 
    File stringconstant.cpp
    Qt Code:
    1. #include "stringconstant.h"
    2. #include <QStringList>
    3. const QStringList StringConstant::EXAMPLE_LIST = QStringList() << QT_TR_NOOP("Hello")
    4. << QT_TR_NOOP("Mother")
    5. << QT_TR_NOOP("Father");
    To copy to clipboard, switch view to plain text mode 
    Problem is: when I run lupdate, the .ts file created, but it have nothing.
    How can I fix this ?

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: QT_TR_NOOP doesnt work

    QT_TR_NOOP is for use where the context of the string can be deduced (you were receiving a warning from lupdate regarding this). You should use QT_TRANSLATE_NOOP and specify a context.

  3. The following user says thank you to ChrisW67 for this useful post:

    vhptt (1st August 2012)

Similar Threads

  1. Qwt Tex Text Doesnt work for me
    By gbmtoday in forum Qwt
    Replies: 1
    Last Post: 21st November 2010, 20:48
  2. connect doesnt work
    By john_god in forum Newbie
    Replies: 4
    Last Post: 23rd November 2008, 10:36
  3. ldapsearch doesnt work.
    By shamik in forum General Discussion
    Replies: 0
    Last Post: 3rd April 2008, 08:25
  4. QFtp...doesnt seems to work ....!!!
    By salmanmanekia in forum Qt Programming
    Replies: 10
    Last Post: 25th February 2008, 09:30
  5. How come this doesnt work?
    By ShaChris23 in forum Newbie
    Replies: 8
    Last Post: 16th June 2007, 05:43

Tags for this Thread

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.