Help..!!! Main Menu on MainWindow by Qt
Dear my friends... I try to make an application whose mainmenu on its mainwindow. this form use MDI, and the every form of each menu will be showed up as the menu on the mainmenu chosen. ============================== !Customer!Order!Quit! !Help! ============================== Here lay the display where the forms show up. =============================== I try to follow the instruction on my Qt book (C++ GUI Programming with Qt3), it say that it the source file is .cpp and .h (mainwindow.cpp and mainwindow.h). I name my mainwindow as depanform so in my case the file are depanform.cpp and depanform.h (I made it with "new mene->C++ source file" and with "new->C++ header file". But If I compile it I got an error message : " patrixlinux@patrix:~/arsip/proyek/qt/5> qmake -o Makefile ./5.pro WARNING: Found potential symbol conflict of depanform.cpp (depanform.cpp) in SOURCES WARNING: Found potential symbol conflict of depanform.h (depanform.h) in HEADERS patrixlinux@patrix:~/arsip/proyek/qt/5> " Please tell me where my mistake... Thank you very much in advamce. Here what I've done: patrixlinux@patrix:~/arsip/proyek/qt/5> ls 5.pro Makefile depanform.cpp depanform.h depanform.ui main.cpp patrixlinux@patrix:~/arsip/proyek/qt/5> qmake -o Makefile ./5.pro WARNING: Found potential symbol conflict of depanform.cpp (depanform.cpp) in SOURCES WARNING: Found potential symbol conflict of depanform.h (depanform.h) in HEADERS patrixlinux@patrix:~/arsip/proyek/qt/5> cat 5.pro unix { UI_DIR = .ui MOC_DIR = .moc OBJECTS_DIR = .obj } TEMPLATE = app LANGUAGE = C++ CONFIG += qt warn_on release HEADERS += depanform.h SOURCES += main.cpp \ depanform.cpp FORMS = depanform.ui patrixlinux@patrix:~/arsip/proyek/qt/5> cat depanform.cpp patrixlinux@patrix:~/arsip/proyek/qt/5> cat depanform.h patrixlinux@patrix:~/arsip/proyek/qt/5> cat depanform.ui <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>depanForm</class> <widget class="QDialog"> <property name="name"> <cstring>depanForm</cstring> </property> <property name="geometry"> <rect> <x>0</x> <y>0</y> <width>600</width> <height>480</height> </rect> </property> <property name="caption"> <string>Menu Utama</string> </property> </widget> <pixmapinproject/> <layoutdefaults spacing="6" margin="11"/> </UI> patrixlinux@patrix:~/arsip/proyek/qt/5> cat main.cpp #include <qapplication.h> #include "depanform.h" int main( int argc, char ** argv ) { QApplication a( argc, argv ); depanForm w; w.show(); a.connect( &a, SIGNAL( lastWindowClosed() ), &a, SLOT( quit() ) ); return a.exec(); } patrixlinux@patrix:~/arsip/proyek/qt/5> __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail
participants (1)
-
Prabu Subroto