[Qt-interest] QPushButton - remain down...

Brad Howes howes at ll.mit.edu
Tue Mar 2 15:51:59 CET 2010


On Mar 2, 2010, at 9:32 AM, BRM wrote:

> I have a series of items I am putting into a QToolBar so the user can select them during run.
> Presently I am using the QCheckBox, but it takes up a lot of room.
> Preferably, I'd like to have a QPushButton kind of widget that has two states: Up and Down.
> Looking through the documentation, I did notice that QPushButton has those states, but it does not seem to remain in those states.
> 
> Am I missing something to enable this?
> Or am I going to need to subclass?


I'm pretty sure you can make it checkable (setCheckable(true)) to do what you want. Not necessarily intuitive...

Brad

-- 
Brad Howes
Group 42
MIT Lincoln Laboratory • 244 Wood St. • Lexington, MA 02173
Phone: 781.981.5292 • Fax: 781.981.3495 • Secretary: 781.981.7420









More information about the Qt-interest-old mailing list