PDA

View Full Version : [QTabWidget] Adding additional button



winuser
3rd December 2010, 11:13
Hello
I wrote a subclass QTabWidget and create additional QPushButton in the constructor, but I do not know how to properly adjust its position. Currently it looks like this:

http://www.images.nsx.pl/uploads/cee00_Clipboard02.png

I need to change the position of QPushButton when user create or delete a bookmark, but I do not know how to get the size and position of the last tab?

high_flyer
3rd December 2010, 12:56
From a quick look at the docs, you might be able to use pTabWidget->tabBar()->tabRect(iIndex).x().