Results 1 to 2 of 2

Thread: Space Between tab and addTab Button

  1. #1
    Join Date
    Jul 2011
    Location
    India
    Posts
    7
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Space Between tab and addTab Button

    I have created a tab from QTabBar and i placed it in a HLayout. then i added a addTabButton to the layout which is really a QLabel...

    but am having a Problem show in the pic below...

    space.png

    there is a space between addbutton and the tab... i want to remove it...

    Qt Code:
    1. HLayout->addSpacing(10);
    2. HLayout->addWidget(MeButton,0,Qt::AlignTop);
    3. HLayout->addSpacing(10);
    4. HLayout->addWidget(tab);
    5. HLayout->addWidget(addButton);
    6. HLayout->addStretch(50);
    7. tab->addTab("Hello");
    To copy to clipboard, switch view to plain text mode 

    this is the code i used

    Help Me Please!!!


    Added after 26 minutes:


    Help Me Please!!!!


    Added after 39 minutes:


    need Help????


    Added after 43 minutes:


    Please Help Me
    Last edited by high_flyer; 25th July 2011 at 17:13. Reason: code tags

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

    Default Re: Space Between tab and addTab Button

    Added after 26 minutes:


    Help Me Please!!!!

    Added after 39 minutes:


    need Help????

    Added after 43 minutes:


    Please Help Me
    You really should learn some manners, and patience!
    Don't do this, it only makes people mad and not want to help you!

    To your questions:
    1. Make sure your QLabel doesn't want to expand to the sides - it could be the QLabel is expanding more then the width of the pixmap in it.
    2. Make sure you set the margins of your layout to 0 or what ever value that looks good in your opinion.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

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

Similar Threads

  1. AddTab button in QTabBar
    By ekapek in forum Newbie
    Replies: 2
    Last Post: 3rd July 2010, 18:51
  2. QTabbar style ::scroller to expand the tab scoll button space.
    By AmolShinde_8 in forum Qt Programming
    Replies: 0
    Last Post: 22nd February 2010, 14:40
  3. Replies: 1
    Last Post: 26th July 2009, 15:08
  4. QTabWidget clicking problems after addTab()
    By DonSam in forum Qt Programming
    Replies: 0
    Last Post: 14th October 2008, 08:28
  5. linking user space and kernel space programs with qmake
    By zielchri in forum Qt Programming
    Replies: 9
    Last Post: 8th March 2006, 23:11

Bookmarks

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.