hi,
Can anybody know what is the code to create a new project in Qt.( using filename and path) .
hi,
Can anybody know what is the code to create a new project in Qt.( using filename and path) .
what kind of project u want to create?
be specific in, what you are asking.
qmake -project
Create the path, create a standard main.cpp, and add a pro where you put in whatever you want. You could also have a look at the sources of Qt Creator to see how they implement their "new project dialog".
when we create a new project in Qt. it will ask filename and path , when you click on finish button a Qt project is created in a folder with newproject.pro, main, mainwindow.cpp, mainwindow.h window will displaying in a Qt window.
What is code written in the Finish button.
In the Same way when i click on finish button in my project(not Qt project ) an xmlfile should be created with zero element, when i make changes in the project the value(element) must be save in the xml file.
i am not getting an idea what to write in Finish button.
And, Is it possible to create a project only with xmlfile?
pLZ GO THROUGH THE UI FILE WHICH I ATTACHED FILE, AND GO THROUGH THE BELOW CODE
// WRITE FILE NAME IN lineEdit as (kk.xml) and choose path in (lineEdit_2) and then click on OK button than the kk.xml have to create // in particular location........
Qt Code:
{ ui.setupUi(this); connect(ui.okButton,SIGNAL(clicked()),this,SLOT(on_okButton_clicked())); connect(ui.cancelButton,SIGNAL(clicked()),this,SLOT(close())); //createNewMenu(); connect(ui.pushButton,SIGNAL(clicked()),this, SLOT(setLastDir())); // eclogic=new ECLogic(); } newproject::~newproject() { //delete ui; } void newproject::setLastDir() { //! set last directory to ImportExport class } void newproject::on_okButton_clicked() { HOW TO WRITE THIS CODE ,................... }To copy to clipboard, switch view to plain text mode
Please go through the attached file and code ,and plz reply me how to write the code ........
thanks
How can we tell ? Are you not sure what your program will do ?HOW TO WRITE THIS CODE ,...................
Hey, YOU want that programm, not me! And till now it's a miracle to me what you really want. If you don't know how to work with XML read the docs about QDomDocument, QDomElement and the examples about XML.
If you then have a specific question, come back.
Take a look at some of these classes in this order:
- http://qt.nokia.com/doc/4.6/qtextstream.html
- http://qt.nokia.com/doc/4.6/qfile.html
- http://qt.nokia.com/doc/4.6/qdatastream.html
This contains examples for creating and writing files. Your code demonstrates that you already understand how to access the controls.
Bookmarks