Hello Kerry,
Thank you very much for your prompt reply.
> Thanks for the info, I will try this.
Thank you. Let me know about any obstacle you may have met ASAP.
> Do you know if anyone has tried to use the Qt layer to try and communicate with a DB from ROOT?
I do not know about any experinec of using Db Qt pacakge from within Qt/Root env. I am forwarding your message to the dedicate http://lists.bnl.gov/mailman/listinfo/qt-root-l list.
> but if I can use Qt it might be worth doing. Any thoughts? I hope it should work. I can imagine a few underwater stones and know how they might have been managed. But first, just try any Qt Db example the way the FileDialog macro shows. Let me know. You can use some other patterns to incorporate the Qt classes in the ROOT applications and versa verse See: http://root.bnl.gov/QtRoot/QtRoot.html#helloroot
http://root.bnl.gov/QtRoot/README_Hello_Example If you would observe some strange "dead-lock" or "unusual bad connection performance" let me know. I'll provide you some fix. However, I hope it should work "as is". I am not certain because I did not investigate the issue deep enough yet.
> Thanks for your help and I'll let you know if I have any problems with the steps you have outlined. Thank you, I am lookind forward to hearing about your expereince and, of course, I anticipate your contribution (in form of the "Bug report" ast least :) soon. My best reagrds, Valeri
Kerry
-----Original Message-----
From: Fine, Valeri [mailto:fine_at_bnl.gov]
Sent: Sun 3/26/2006 12:27 PM
To: Fine, Valeri; Ilka Antcheva; Lee, Kerry T. (JSC-SF)[UHCL]; roottalk_at_pcroot.cern.ch
Subject: RE: [ROOT] TGFileContainer MultipleSelections
Hello
I am sorry, I missed to add the relevant ROOT macro.
Assuming you have the standard ROOT installation with Qt (for example at CERN)
http://root.bnl.gov/QtRoot/expert/26.03.2006/setup_root_cern_5.10.b.csh
<http://root.bnl.gov/QtRoot/expert/26.03.2006/setup_root_cern_5.10.b.csh
>
2. Make a local copy ."rootrc" file to turn on the Qt-layer
http://root.bnl.gov/QtRoot/expert/26.03.2006/.rootrc
<http://root.bnl.gov/QtRoot/expert/26.03.2006/.rootrc>
3. Copy the C++ ROOT macro
http://root.bnl.gov/QtRoot/expert/26.03.2006/FileDialog.C
<http://root.bnl.gov/QtRoot/expert/26.03.2006/FileDialog.C>
ifndef __CINT__
# include <qfiledialog.h> # include <qstringlist.h> # include <qstring.h> #endif
// gSystem->AddIncludePath("-I$QTDIR/include");
// See: http://doc.trolltech.com/3.3/qfiledialog.html#getOpenFileNames
<http://doc.trolltech.com/3.3/qfiledialog.html#getOpenFileNames>
QStringList files = QFileDialog::getOpenFileNames ();
QStringList::Iterator it = files.begin(); while ( it != files.end() ) {
printf ("Next file selected: %s\n", (const char *)(*it)); ++it;
4. Start ROOT session and execute 2 ROOT command
root [0] gSystem->AddIncludePath("-I$QTDIR/include"); root [1] .x FileDialog.C++
5. You should get the Qt widget
http://root.bnl.gov/QtRoot/expert/26.03.2006/FileDialog.png
<http://root.bnl.gov/QtRoot/expert/26.03.2006/FileDialog.png>
6. You should see the the of the selected file names
http://root.bnl.gov/QtRoot/expert/26.03.2006/FileDialogLxplus.log.png
<http://root.bnl.gov/QtRoot/expert/26.03.2006/FileDialogLxplus.log.png>
If you don't this maynave ment there is some bug to be fixed. Please file the ROOT bug report.
Either way your kind feedback would be appreciated a lot.
Thank you, Hope this helps
I
From: Fine, Valeri
Sent: Sat 3/25/2006 12:21 PM
To: Ilka Antcheva; Lee, Kerry T. (JSC-SF)[UHCL]; roottalk_at_pcroot.cern.ch
Subject: RE: [ROOT] TGFileContainer MultipleSelections
My I remind people that there is the back door called Qt-layer
If you need "multiple selections" now you can use Qt class
http://doc.trolltech.com/3.3/qfiledialog.html
<x-excid://3E8A0000/uri:http://doc.trolltech.com/3.3/qfiledialog.html>
(you should turn on the Qt layer using ".rootrc". resource file see
ftp://root.cern.ch/root/doc/chapter26.pdf
<x-excid://3E8A0000/uri:ftp://root.cern.ch/root/doc/chapter26.pdf> page
393)
As soon as ROOT TG provides the function you are seeking you may have
replaced it back with the "TG" counterpart.
Hope this helps Valeri
From: Ilka Antcheva
Sent: Sat 3/25/2006 4:17 AM
To: Lee, Kerry T. (JSC-SF)[UHCL]; roottalk_at_pcroot.cern.ch
Subject: RE: [ROOT] TGFileContainer MultipleSelections
Hi Kerry,
This feature is not available yet in TGFileConaines but will come soon because of internal needs to have it. We will keep you informed.
Cheers, Ilka
From: owner-roottalk_at_pcroot.cern.ch on behalf of Lee, Kerry T. (JSC-SF)[UHCL] Sent: Sat 3/25/2006 12:36 AM
To: roottalk_at_pcroot.cern.ch
Subject: [ROOT] TGFileContainer MultipleSelections
Dear Rooters,
How do I allow for multiple selections via a mouse click within a TGFileContainer?
Thanks
Kerry Received on Sun Mar 26 2006 - 22:31:09 MEST
This archive was generated by hypermail 2.2.0 : Mon Jan 01 2007 - 16:31:57 MET