PDA

View Full Version : hide tab within a tabified dock widget



navid
7th July 2010, 08:28
hi

there is a strange problem.
dock->tab_5->hide();
dose not work.
there is 5 tabs in the proposed dock

regards
navid

navid
7th July 2010, 10:52
it is Qt4.6.3 on WinXP-SP3

navid
7th July 2010, 14:25
hey
anybody ?

Vit Stepanek
7th July 2010, 15:37
Can you please specify the classes you are using? Can you add some code examples?

navid
7th July 2010, 15:52
#include "buildingwidgets.h"


class BuildingWidgets : public QDockWidget
{
Q_OBJECT
public:
BuildingWidgets(QWidget * pqwparent=0);
~BuildingWidgets();
}



BuildingWidgets::BuildingWidgets(QWidget * pqwparent):
QDockWidget(pqwparent), dock(new Ui::BuildingWidgets)
{
dock->setupUi(this);
dock->tab_admin->hide();
}

navid
7th July 2010, 16:05
I didn't send the details
there is all of the "include, signals, slots,..."


but only two commands of dock->tab_admin->hide(); or dock->tab_admin->setVisible(false); do not work!!

Vit Stepanek
7th July 2010, 16:25
Well, you're a bit mean with the posts, aren't you?
What exactly does the code do wrong? From what I see I can't figure out what's wrong. Does the widget "tab_admin" hide? Probably yes, but the dock widget not, is that true? Provide more information, please. What's in ui_buildingWidgets.h?

navid
7th July 2010, 16:30
I said that it is strange
I want to hide Tab tab_admin (between several available tabs), but it is visible!!

navid
7th July 2010, 17:23
find enclosed 'ui_buildingWidgets.h'

agathiyaa
7th July 2010, 18:12
try removing your tabified dock widget using..

QMainWindow::removeDockWidget ( QDockWidget * dockwidget ) & you may restore using QMainWindow::restoreDockWidget ( QDockWidget * dockwidget )