QDockWidget *dockwidger;
dockwidget->hide();
QDockWidget *dockwidger;
dockwidget->hide();
HI..
Thanks for ur reply, but u understand the problem in wrong way.. may be im not clear... sorry for that.
i will explain again...
I want have a Autohide option to QDockWidget (ike In Microsoft Visual Studio Environment if we open solution explorer, to hide option vl be there in tittle bar), like wise in our QDockwidget is there any possibility for auto hide.
Vani.Y
You'd have to manually do that afaik. Create a slot to hide or show the widget and call the slot when the the signal is emitted.
fnmblot
--------------------------------------
Gee Ricky, I'm sorry your mom blew up.
Vani (2nd May 2008)
I am doing the same now and it looks like I will have to implement this feature myself. I have found an example here that looks promising:
http://labs.trolltech.com/forums/topic/406
John
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