Results 1 to 3 of 3

Thread: problem with designer

  1. #1
    Join Date
    Apr 2006
    Posts
    10
    Thanks
    1
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Windows

    Question problem with designer

    operating system : windows Xp
    version : Qt 4.1
    compiler : MinGW


    hai all,
    1) designed a simple application with gui in mainwindow having comboBox in it.
    2) i wrote main as follow

    Qt Code:
    1. #include "ui_test1.h"
    2. #include <QApplication>
    3. #include <QtGui/QtGui>
    4. int main(int argc, char *argv[])
    5. { QApplication app(argc, argv);
    6. QDialog *window = new QDialog;
    7. Ui::Dialog ui;
    8. ui.setupUi(window);
    9. ui.comboxBox->addItem(tr("123"));
    10. window->show();
    11. return app.exec();
    12. }
    To copy to clipboard, switch view to plain text mode 
    3)i did qmake -project
    then qmake test1.pro
    then make
    3.1) when i make , i was getting an error that
    " tr funtion undeclared first use the function"

    have i made any mistake in the above code??

    basha

    A FRIEND IS IN NEED.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: problem with designer

    Use QObject::tr() (static method) instead.

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

    bashamehboob (12th April 2006)

  4. #3
    Join Date
    Apr 2006
    Posts
    10
    Thanks
    1
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Windows

    Default Re: problem with designer

    thanks its working
    bye
    basha

Similar Threads

  1. Can't drop a widget in designer - solution
    By heathbar82 in forum Qt Tools
    Replies: 2
    Last Post: 24th July 2012, 15:47
  2. Replies: 5
    Last Post: 23rd October 2008, 13:55
  3. Problem in using QHttp with QTimer
    By Ferdous in forum Newbie
    Replies: 2
    Last Post: 6th September 2008, 12:48
  4. QT Designer 3.3.8b redraw problem
    By garry_3peace in forum Qt Tools
    Replies: 1
    Last Post: 29th August 2008, 16:05
  5. Facing problem with qt-4.1 designer
    By jnana in forum Qt Tools
    Replies: 4
    Last Post: 8th March 2006, 18:16

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.