Yeah I was looking for this too. Wondering if someone did make this implementation as close accurate as the .NET Dock widget, will Qt accept it.
Yeah I was looking for this too. Wondering if someone did make this implementation as close accurate as the .NET Dock widget, will Qt accept it.
With the new animation framework (and the state subframework it uses) it should be pretty simple to implement a nice IDEAI mode.
I have checked out this example:
http://kde-apps.org/content/show.php?content=44015
and it seems like it may be a better starting point for what I want. It's almost 3 years old but it still works with Qt 4.5.
John
Little hard to read lacking barely any documentation of how it works and what not. The little fade in over the button is ugly
I've been searching for an answer to this for the last few hours and I think I've come up with a good solution.
QDockWidget has a method that called setTitleBarWidget(QWidget *). I created a subclass of QTabBar and set this as the TitleBarWidget for my dock.
In the subclassed QTabBar, I passed in the widget to be displayed so that I could change the size (in my case width to 0) to show/hide the dock widget. I added a tab with the title I wanted for the button to toggle the display of the dock widget. Then, I overrode the MousePressEvent method so that when the Tab Item was clicked, it would change the width of the dock accordingly to show/hide my dock widget.
Although this thread is a few years old, I hope this still helps someone.![]()
Try This: setAttribute(Qt::WA_WState_ExplicitShowHide);
Bookmarks