*****************************************************************************/ ** ** Copyright (C) 2005 by Valeri Fine. BNL. All rights reserved. ** ** This file may be distributed under the terms of the Q Public License ** as defined by Trolltech AS of Norway and appearing in the file ** LICENSE.QPL included in the packaging of this file. *****************************************************************************/ This "CustomWidget" example demonstrates the ROOT-based Qt application. with the 3 "Custom widget" from QtRootGui library of QtRoot system: TQtFloatSpinBox.h - To input the float point values (The QSpinBox works with the integers only) TQtFloatSlider - To input the float point values (The QSlider works with the integers only) TQtColorSelectButton.h - To select the ROOT color from the color box dialog TQtPatternSelectButton.h - to select the ROOT hatch style from the "select style dialog" TQtLineStyleComboBox - it use the "offscreen" TPad to populate the Qt QComboBox with the images of TLine ROOT object with the different values of ROOT "style" attributes to choose from. TQtLineWidthComboBox - it use the "offscreen" TPad to populate the Qt QComboBox with the images of TLine ROOT object with the different values of the ROOT "width" attribute to choose from. TQtPatternSelectButton - it use the "offscreen" TPad to populate the Qt QComboBox with the images of TText ROOT object with the different values of the ROOT "font number" attribute to choose from. See: http://root.cern.ch/phpBB2/viewtopic.php?t=2529 http://root.bnl.gov/QtRoot/QtRoot.html#designer To build it from the Qt project file do 1.> qmake 2.> make (or "nmake" on Windows, no cygwin !!! ) To start the application do: 3. "CustomWidgets [-style=windows | platinum | motif ]" One can define the custom look and feel of the GUI application. The number of the available different styles is defined by your local Qt installation. You can check the style available by running "qtconfig" utility See: "http://doc.trolltech.com/3.3/qapplication.html#QApplication" for details and other command mode parameters. 4. Try to change the design of the widget via qt "designer" (see: http://root.bnl.gov/QtRoot/pictures/QtROOTCustomWidgets.png ) > designer CustomWidgets.pro > qmake > make Valeri Fine (fine@bnl.gov) http://root.bnl.gov