Results 1 to 5 of 5

Thread: Custom QTabWidget loses capability to re-adjust size

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2015
    Location
    Barquisimeto, Venezuela
    Posts
    24
    Thanks
    2
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Android

    Default Re: [SOLVED] Custom QTabWidget loses capability to re-adjust size

    Hi everyone again.

    After researching a lot, and consider and make several tests with the suggestion anda_skoa, I have managed to solve the problem of adjustment that I then had to "crash" area QTabWidget pages.

    The answer is somewhat simple and though the programming is inelegant, here is the left in a compressed, if someone has the same problem or something similar.

    The solution enables:
    1-. "Collapse" the page area of ​​a QTabWidget the minimum level to allow display of the tabs.
    2-. "Uncollapse" the page area of ​​restoring the pre QTabWidget "collapse" of the same dimensions.
    3-. Resize the tab area via QSplitter.
    4-. "Collapse" the page area of ​​a QTabWidget via QSplitter the minimum level to allow display of the tabs.
    5-. Even not allow "Uncollapse" via QSplitter.

    P.S.1 Something that was me all this research is that when you want to work with changing the size and / or dimensions of a widget, only work with setGeometry, instead of assigning and / or directly modify the values ​​of size, fixedSize and similar, blocking widget functionality as QSplitter convenience to make adjustments when required. Please correct me if I'm wrong.
    ****
    P.S.2 Another interesting thing also I discovered in this search is that it would be much better achieve do this in combination QDockWidget and QStackedWidget, but I failed as assign a custom QTabBar to achieve better handling of the widget to insert and to move them to any DockArea convenience.

    Thank you for all anda_skoa.
    Attached Files Attached Files
    Last edited by remizero; 21st June 2016 at 19:28.

Similar Threads

  1. Replies: 1
    Last Post: 7th May 2015, 20:58
  2. adjust table size in QDockWidget
    By jackajack01 in forum Qt Programming
    Replies: 0
    Last Post: 13th August 2012, 20:50
  3. I can not adjust the size of a widget to your content.
    By jjcarles in forum Qt Programming
    Replies: 3
    Last Post: 8th April 2010, 22:54
  4. QTabWidget adjust internal Widget to fit full size
    By ^NyAw^ in forum Qt Programming
    Replies: 4
    Last Post: 25th December 2009, 01:20
  5. adjust font size to QLabel-size
    By hunsrus in forum Qt Programming
    Replies: 0
    Last Post: 9th July 2008, 14:33

Tags for this Thread

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.