I need to design a custom panel that will pop-up next to some of my QPushButtons when they are mouseOver'ed. Initially, the panels will contain only 2 types of widgets: varying numbers of QPushButtons and a QSlider, although I'd like to keep open the option to include additional widgets later.
So I figure I'll create a new BuPanel subclass... but looking over chapter 5 in "C++ GUI Programming with Qt4" I'm not sure what approach I should take. Their HexSpinBox example is a simple sub-class from QSpinBox, but in my case I'll have at least 2 primary widgets... would you recommend creating a new class derived from both QPushButton and QSlider? (or just QPushButton, and include a "class QSlider;" declaration in the header?) And will I have to include a parameter in the constructor which sets the number of buttons in a given panel?
edit: here's an example-
http://www.beg.utexas.edu/coastal/wrl/del/panel.png
mousing over "shorelines" brings up the panel with buttons & slider (red triangle) to the right. User can either click buttons or drag the slider to change selection.
Bookmarks