Results 1 to 11 of 11

Thread: code for new project

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2010
    Posts
    28
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    2

    Default code for new project

    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:
    1. newproject::newproject(QWidget *parent)
    2. : QDialog(parent)
    3. {
    4. ui.setupUi(this);
    5. connect(ui.okButton,SIGNAL(clicked()),this,SLOT(on_okButton_clicked()));
    6. connect(ui.cancelButton,SIGNAL(clicked()),this,SLOT(close()));
    7. //createNewMenu();
    8. connect(ui.pushButton,SIGNAL(clicked()),this, SLOT(setLastDir()));
    9. // eclogic=new ECLogic();
    10. }
    11.  
    12. newproject::~newproject()
    13. {
    14. //delete ui;
    15. }
    16.  
    17. void newproject::setLastDir()
    18. {
    19. //! set last directory to ImportExport class
    20.  
    21. ui.lineEdit_2->setText(QFileDialog::getExistingDirectory(this, msg_head_lastDirDialog,
    22. "/home", QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks) + "/");
    23. }
    24.  
    25. void newproject::on_okButton_clicked()
    26. {
    27. HOW TO WRITE THIS CODE ,...................
    28.  
    29. }
    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
    Attached Files Attached Files

  2. #2
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    8
    Thanked 334 Times in 317 Posts

    Default Re: code for new project

    HOW TO WRITE THIS CODE ,...................
    How can we tell ? Are you not sure what your program will do ?

  3. #3
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Wiki edits
    5

    Default Re: code for new project

    Quote Originally Posted by rk0747 View Post
    pLZ GO THROUGH THE UI FILE WHICH I ATTACHED FILE, AND GO THROUGH THE BELOW 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.

  4. #4
    Join Date
    Jan 2010
    Posts
    73
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    6
    Thanked 8 Times in 8 Posts

    Default Re: code for new project

    Take a look at some of these classes in this order:
    1. http://qt.nokia.com/doc/4.6/qtextstream.html
    2. http://qt.nokia.com/doc/4.6/qfile.html
    3. 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.

Similar Threads

  1. QT Project source code
    By darpan in forum Qt Programming
    Replies: 3
    Last Post: 27th December 2012, 16:16
  2. Replies: 1
    Last Post: 3rd December 2009, 23:34
  3. Replies: 0
    Last Post: 30th July 2009, 21:56
  4. Pasting code from code tag in emacs
    By Gopala Krishna in forum General Discussion
    Replies: 0
    Last Post: 16th February 2007, 05:47
  5. Project generation on linux from QT Project
    By darpan in forum Qt Programming
    Replies: 6
    Last Post: 11th December 2006, 09:43

Tags for this Thread

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
  •  
Qt is a trademark of The Qt Company.