getOpenFileName(QString)

Parent Previous Next

TW.app.getOpenFileName(QString);


This is an overload function to getOpenFileName()


It will cause the "open file" dialogue box to appear and return the file name chosen or an empty string if no file  is chosen.


A full path name is returned.


This function requires  a string as the argument, which is a filter.


The filter can be as simple as,


   "*.jpg"

 

or include a message and in round brackets a file extension,


  "Jpeg (*.jpg)"


include a maeesage adfn a space separated list of file extensions enclosed in round brackets,


"Image Files (*.jpg *.jpeg *.png *.pdf)"


  TW.information(null,"Choose Image",TW.app.getOpenFileName("Image

Files (*.jpg *.jpeg *.png *.pdf)"));


Note: The function dos not itself open anything, only returns the path and name that the user selects.




See also getOpenFileNames() and getOpenFileNames(QString)


For source code examples of filters see Filters in

http://www.google.com/codesearch/p?hl=en#TCAOwTxChU8/trunk/src/TWUtils.cpp


For the C++ implementation of code see

http://www.google.com/codesearch/p?hl=en#TCAOwTxChU8/trunk/src/TWApp.cpp&q=getOpenFileName%20package:http://texworks%5C.googlecode%5C.com

Created with the Personal Edition of HelpNDoc: Easily create Web Help sites