I am applying the exmaple of MainWindow which in documentation,I have an error
maingw-make[1]:***[tmp/obj/release_shared/mainwindow.o]Error1
you can find the example in this link
http://doc.trolltech.com/4.2/mainwindows-mdi.html
Thanks
I am applying the exmaple of MainWindow which in documentation,I have an error
maingw-make[1]:***[tmp/obj/release_shared/mainwindow.o]Error1
you can find the example in this link
http://doc.trolltech.com/4.2/mainwindows-mdi.html
Thanks
Last edited by amagdy.ibrahim; 14th June 2008 at 01:13.
What exactly is the error? Please provide the first error message.
I took the code of mainwindow.cpp,mainwindow.h,mdichild.cpp,mdi.h and main (copy+paste) ypu can see it on http://doc.trolltech.com/4.2/mainwindows-mdi.html
Then after running the code this errors or warnings appeared and I don't know the reasons:
Collect2:Id returned 1 exit status
mingw32-make[1]:***[release/Main3.exe]Error1
mingw32-make[1]:Leaving directory 'E:/QT/4.4/Main3'
mingw32-make:***[release] Error2
I hope you understood me now
BTW:I indcluded the two header filestmp/obj/release_shared/main.o(.text +0*66):main.cpp:undifiened reference to qInit Rescources_mdi()
I wrote this code in the main
BTW:I know it isn't right to comment return but I commented it becuase there is an error is appeared:Qt Code:
#include <QApplication> #include <QMainWindow> #include"mainwindow.h" int main(int argc, char *argv[]) { /*QApplication app(argc, argv); Ui_MainWindow ui; QMainWindow *Widget = new QMainWindow; ui.setupUi(Widget); Widget->show();*/ Q_INIT_RESOURCE(mdi); MainWindow mainWin; mainWin.show(); // return app.exec(); }To copy to clipboard, switch view to plain text mode
I hope you understood me nowmin.cpp19:error 'app' undeclared (first use of this fucntion)
Last edited by jpn; 19th June 2008 at 05:33. Reason: missing [code] tags
hey,thanks all it is working now I just commented the Q_intrecources
and it is working now
thanks
Hi
I am modifyfing now in the program in documentation,I need to open child without text file
this fucntion is create child
and this in mdichildQt Code:
void MainWindow::newFile() { MdiChild *child = createMdiChild(); child->newFile(); child->show(); } MdiChild *MainWindow::createMdiChild() { MdiChild *child = new MdiChild; workspace->addWindow(child); connect(child, SIGNAL(copyAvailable(bool)), cutAct, SLOT(setEnabled(bool))); connect(child, SIGNAL(copyAvailable(bool)), copyAct, SLOT(setEnabled(bool))); return child; }To copy to clipboard, switch view to plain text mode
plz help me,again I need the cild window with text file document just the child window apear.thanksQt Code:
MdiChild::MdiChild() { setAttribute(Qt::WA_DeleteOnClose); isUntitled = true; }To copy to clipboard, switch view to plain text mode
Last edited by wysota; 14th June 2008 at 14:19. Reason: missing [code] tags
Bookmarks