[Qt-interest] best approach for a tool window
Brad Howes
howes at ll.mit.edu
Mon Sep 14 15:20:57 CEST 2009
On Sep 13, 2009, at 10:49 AM, Martin Schröer wrote:
> I was wondering what would be the best approach to implement a
> tool window in a fashion like seen in inkscape for example.
>
> ( Having a tool window being part of the main window,
> able to hide / show it - when it's shown, it occupies some
> space of the main area displaying the tools, if hidden, it is
> minimized to a kind of title bar using which it can be
> expanded )
I like the QToolBar and QMainWindow management of QToolButton objects,
though it is somewhat limited when you try to use other QWidget
widgets -- I have with sliders and checkboxes and regular buttons. I
have not played with QDockWidget, but I think that that would get you
closest to the Inkscape way of managing tool windows. For my own tool
windows, I use the Qt::Tool window attribute which looks great on Mac
OS X, but has selection issues on Gnome/X11, so I just use
Qt::WindowStaysOnTopHint instead. I use a QToolButton to toggle the
visibility of the QDialog tool window, and my users appear to be happy
with this approach.
I personally do not like the docking of Inkscape; I'd rather have the
tool window float above the document, like Adobe. I also don't agree
with multiple tool windows, one for each document. This makes the
screen too cluttered. Perhaps I'm too biased towards Apple, Adobe way
of doing things, but I find it the most productive for me.
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