Results 1 to 2 of 2

Thread: [QTabWidget] Adding additional button

  1. #1
    Join Date
    Dec 2010
    Qt products

    Default [QTabWidget] Adding additional button

    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:

    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?

  2. #2
    Join Date
    Jan 2006
    Munich, Germany
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Unix/X11 Windows

    Default Re: [QTabWidget] Adding additional button

    From a quick look at the docs, you might be able to use pTabWidget->tabBar()->tabRect(iIndex).x().
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

Similar Threads

  1. Qt Designer Solved: Adding widgets to QTabWidget layout
    By koan in forum Qt Tools
    Replies: 1
    Last Post: 13th February 2011, 23:35
  2. QTabWidget + tab button color( how to set ? )
    By medved6 in forum Qt Programming
    Replies: 1
    Last Post: 10th September 2010, 09:53
  3. Qtabwidget - how to add a button to all tabs?
    By creep33 in forum Qt Programming
    Replies: 2
    Last Post: 22nd July 2010, 19:05
  4. Button on QTabWidget
    By winston2020 in forum Qt Programming
    Replies: 3
    Last Post: 24th October 2008, 07:45
  5. Adding QGroupBox to QTabWidget
    By mclark in forum Newbie
    Replies: 2
    Last Post: 17th January 2007, 16:27


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.