Web lists-archives.org

Re: Toolbars in dock widgets




On 12.05.08 21:18:40, Stefan Majewsky wrote:
> I'm designing a dock widget which does essentially consist of a QListView and 
> three actions (currently implemented as KPushButton instances). To optimize 
> the minimum size of the dock, I would like to move from the KPushButton row 
> to a KToolBar, but there seems to be no simple way to insert the toolbar into 
> the dock widget.
> 
> The obvious solution is to handle the toolbar like a normal widget, i.e. 
> insert the toolbar and the list view into a layout and put this into the dock 
> widget. The disadvantage is that I cannot do all that fancy mainwindow stuff 
> like to moving the toolbar to the bottom edge.
> 
> Another possibility is to embed a QMainWindow into the dock widget (instead of 
> a simple QWidget). For my taste, that is too much overhead.
> 
> Isn't there a better approach?

No, KDevelop uses the same to get toolbars in toolviews and its not that
much overhead.

Andreas

-- 
Live in a world of your own, but always welcome visitors.
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<