Results 1 to 3 of 3

Thread: How to create filedialoge for creating new file?

  1. #1
    Join Date
    May 2011
    Posts
    120
    Thanks
    9
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default How to create filedialoge for creating new file?

    Hi all
    i am going to create a file dialoge for creating a new file, but i do not find any function for same in QFileDialoge class. As there is a open file dialoge in this class. How to create filedialoge for new file.
    Thanks.

  2. #2
    Join Date
    Apr 2011
    Location
    Russia
    Posts
    85
    Thanks
    2
    Thanked 13 Times in 13 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to create filedialoge for creating new file?

    Qt Code:
    1. bool OK = false;
    2.  
    3. QString fileName = QInputDialog::getText( 0, QObject::tr("Create File"),
    4. QObject::tr("Input file name:"), QLineEdit::Normal, "", &OK );
    5.  
    6. if (OK)
    7. {
    8. // Create file
    9. }
    To copy to clipboard, switch view to plain text mode 

  3. #3
    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 create filedialoge for creating new file?

    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Creating xml file from Xml Schema (xsd) file
    By pieczara in forum Newbie
    Replies: 1
    Last Post: 25th February 2011, 23:11
  2. creating Xml file using QT
    By rk0747 in forum Qt Programming
    Replies: 3
    Last Post: 30th January 2010, 11:16
  3. Creating xls File
    By bismitapadhy in forum Qt Programming
    Replies: 0
    Last Post: 26th May 2009, 11:35
  4. Creating new XML file
    By Pembar in forum Qt Programming
    Replies: 3
    Last Post: 16th May 2009, 08:06
  5. creating .cfg file in qt
    By vishal.chauhan in forum Qt Programming
    Replies: 1
    Last Post: 11th January 2007, 10:26

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.