Results 1 to 9 of 9

Thread: how to get code for dialog in qt4.1.2

  1. #1
    Join Date
    Apr 2006
    Posts
    122
    Thanks
    18
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default how to get code for dialog in qt4.1.2

    hi
    this is really some stupid question but can't help.
    In Qt3.3.4 when we r-click on dialog we get an option o explore the code and add to it.
    How i can get code in Qt4.1.2 There no such menu appears.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: how to get code for dialog in qt4.1.2

    Where exactly did you see that? In Qt Designer?

  3. #3
    Join Date
    Apr 2006
    Posts
    122
    Thanks
    18
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: how to get code for dialog in qt4.1.2

    in qt4.1.2 also a menu apears but there is no menu item which will took me to its ui class source.

  4. #4
    Join Date
    Jan 2006
    Location
    Kerala
    Posts
    371
    Thanks
    76
    Thanked 37 Times in 32 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: how to get code for dialog in qt4.1.2

    It doesnot have the open u r looking for
    Please refer the Article

    http://doc.trolltech.com/qq/qq14-designer.html
    We can't solve problems by using the same kind of thinking we used when we created them

  5. #5
    Join Date
    Apr 2006
    Posts
    122
    Thanks
    18
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: how to get code for dialog in qt4.1.2

    i got the header source of uic and added my code but on make it gives following errors, i can't understand what it mean.
    I have both qt3.3.4 and qt4.1.2 installed on my system but i don't think this should be any issue and i had make sure i use qt4.1.2 components.
    Qt Code:
    1. make
    2. g++ -c -pipe -g -Wall -W -D_REENTRANT -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED ... -o main.o main.cpp
    3. g++ -c -pipe -g -Wall -W -D_REENTRANT -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED ... -o MyDialog.o MyDialog.cpp
    4. /usr/local/Trolltech/Qt-4.1.2/bin/moc -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED ... MyDialog.h -o moc_MyDialog.cpp
    5. g++ -c -pipe -g -Wall -W -D_REENTRANT -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED ... -o moc_MyDialog.o moc_MyDialog.cpp
    6. moc_MyDialog.cpp:43: error: ‘staticMetaObject’ is not a member of ‘Ui_Dialog’
    7. moc_MyDialog.cpp: In member function ‘virtual void* MyDialog::qt_metacast(const char*)’:
    8. moc_MyDialog.cpp:59: error: ‘qt_metacast’ is not a member of ‘Ui_Dialog’
    9. moc_MyDialog.cpp: In member function ‘virtual int MyDialog::qt_metacall(QMetaObject::Call, int, void**)’:
    10. moc_MyDialog.cpp:64: error: ‘qt_metacall’ is not a member of ‘Ui_Dialog’
    11. make: *** [moc_MyDialog.o] Error 1
    To copy to clipboard, switch view to plain text mode 
    Last edited by jacek; 8th June 2006 at 13:06. Reason: shortened the quote, so it doesn't break the page layout

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: how to get code for dialog in qt4.1.2

    Quote Originally Posted by quickNitin
    i got the header source of uic and added my code
    You shouldn't modify the code produced by uic.

    Read this: http://doc.trolltech.com/4.1/designe...component.html (especially the part about single inheritance approach).

  7. #7
    Join Date
    Apr 2006
    Posts
    122
    Thanks
    18
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: how to get code for dialog in qt4.1.2

    i am sorry for language mistake. By adding my code i mean i inherited that class. and i have again produced the code for dialog.
    I am following multiple inheritance approach.
    Can this problem be due to order of putting classes for inheritance. I have put QDialog after Ui_class.
    i will check it

  8. #8
    Join Date
    Apr 2006
    Posts
    122
    Thanks
    18
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: how to get code for dialog in qt4.1.2

    ya code got compiled but i am still searching for reason of error. Once i studied the cause but i had forget it.

  9. #9
    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: how to get code for dialog in qt4.1.2

    QObject subclass has to go first in the inheritance code. Otherwise moc won't work properly.

Similar Threads

  1. Replies: 5
    Last Post: 15th March 2006, 07:33
  2. Code editor
    By Michiel in forum Qt Programming
    Replies: 4
    Last Post: 14th March 2006, 17:20
  3. Mac Port of Windows code
    By Nemo in forum Qt Programming
    Replies: 2
    Last Post: 13th February 2006, 07:37

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.