tabWidget tabs closebutton always closes the current tab
Hi,
I have a tabWidget with tabs that have red close buttons. If I hover with my mouse over the non current tabs they highlight and I can press the red close button. However, instead of closing the tab that is highlighted, the current tab is closed.
Is that normal ? How can I prevent this?
thanx
Re: tabWidget tabs closebutton always closes the current tab
Can you show your method to where tabCloseRequested signal is connected? Maybe you are removing current tab instead of the one that is requested i.e. to where the index points to?
Re: tabWidget tabs closebutton always closes the current tab
there was the problem, I ignored the 'int' in
connect(tabWidget, SIGNAL(tabCloseRequested(int)), this, SLOT(closeTab(int)));
thanks