Filling DropDowns with directory listings.

Parent Previous Next

Another example is filling a dropdown (select) box. in Qt QCombobox, with a directory box.


Under Windows this could look like this...


var fileList = twPan.osCmd("cmd /c dir /b \""

                      + pathDir + "\\*" + fileExtension + "\""

                      , true)

       removeExtnsn = new RegExp(fileExtension,"ig");

  var  fileList = fileList.replace(removeExtnsn,"").split(lineBreak);

  var chosenAnswer = twPan.select(Description, fileList);


Created with the Personal Edition of HelpNDoc: Free help authoring tool