Example #1
0
	void SeparateTabBar::tabRemoved (int index)
	{
		QTabBar::tabRemoved (index);

		int length = 0;
		for (int i = 0; i < count (); ++i)
			length += tabRect (i).width ();

		if (length + 60 < width () && !IsLastTab_)
		{
			IsLastTab_ = true;

			addTab (QString ());
			SetTabClosable (count () - 1, false);

			emit showAddTabButton (false);
		}

		if (index != count () - 1 && !IsLastTab_)
			emit tabWasRemoved (index);
	}
Example #2
0
	void SeparateTabBar::tabRemoved (int index)
	{
		QTabBar::tabRemoved (index);
		emit tabWasRemoved (index);
	}