Index of QT classes

ROOT Qt-layer classes


direct use of the Qt QFileDialog to select one file

// @(#)root/qt:$Name:  $:$Id: QtFileDialog.C,v 1.4 2006/04/20 22:29:11 fine Exp $
// Author: Valeri Fine   23/03/2006
#ifndef __CINT__
#  include <qfiledialog.h> 
#  include <qstring.h> 
#endif
TString QtFileDialog() {
  // This is a small ROOT macro to use Qt 3.3 class: 
QFileDialog
  // See: 
http://doc.trolltech.com/3.3/qfiledialog.html#getOpenFileName
  //
  // To use, invoke ACLiC from the ROOT prompt:
  // root [] .x QtFileDialog.C++
  //
  // To use it with no ACLiC, omit the trailing "++"
  // root [] .x QtFileDialog.C
  //
  // The QtFileDialog returns TString object that contains the selected file name.
  // returns its pointer.
  // The macro QtMultiFileDialog.C provides an advanced example.
  //
  // The full list of the Qt classes available from Cint is defined by
  // 
by $ROOTSYS/cint/lib/qtclasses.h
  //
  // All Qt classes can be used from ACLiC though.
  
#ifdef __CINT__
  // Load the qt cint dictionary.
  // One is recommended to do that at once somewhere.
  // For example  from his/her custom rootlogon.C script
  gSystem->Load("$ROOTSYS/cint/include/qtcint");
#endif   
  QString fileName = QFileDialog::getOpenFileName ();
  return TString((const char *)fileName);
}

 

Qt/ROOT page - ROOT page - Class index - Class Hierarchy - Top of the page - Qt docs

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to QtROOT support, or contact the developers with any questions or problems regarding ROOT.