Results 1 to 6 of 6

Thread: QTabWidget - problem with resizing

  1. #1
    Join Date
    Aug 2006
    Posts
    83

    Default QTabWidget - problem with resizing

    Hello

    I have a problem with resizing QTabWidget. I want that my tabs (2) resize accordingly to the window (window of some kind) that they are appended to.
    example:
    i have a dialog, which i can resize and tabs lying south from it. I don't know how to resize the tabs accordingly to the dialogs size. any help??

  2. #2
    Join Date
    Apr 2006
    Location
    San Francisco, CA
    Posts
    186
    Thanks
    55
    Thanked 12 Times in 11 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: QTabWidget - problem with resizing

    Perhaps you just need to set those tabs inside a layout? If you're using designer, can just right-click->Lay out in a grid?
    Software Engineer



  3. #3
    Join Date
    Aug 2006
    Posts
    83

    Default Re: QTabWidget - problem with resizing

    Ok. I'll try that. I have another problem with resizing and it's with dockwidget. I want it to have the smallest size by default (i already set setMinimumSize()) when it's in vertical position, but i still want to have the luxury to extend it, while when it's in horizontal position I want it to expand as much as possible.
    I use:
    setMinimumSize(202,265);
    setSizePolicy(QSizePolicy::MinimumExpanding,QSizeP olicy::MinimumExpanding);

    but this doesn't do the trick -> it works only for when it's in horizontal mode, in vertical it extend beyound the smallest size.

  4. #4
    Join Date
    Aug 2006
    Posts
    83

    Default Re: QTabWidget - problem with resizing

    Does anyone have any clue how to solve this?

  5. #5
    Join Date
    May 2006
    Location
    Bangalore,India
    Posts
    235
    Thanks
    7
    Thanked 25 Times in 24 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Re: QTabWidget - problem with resizing

    if you want small size then use setMaximumWidth() or setMaximumSize().

    here I am pasting my application code:

    [html]
    m_pWorkspaceDockWidget = new QDockWidget( "Workspace Explorer", this );

    m_pWorkspaceDockWidget->setFeatures( QDockWidget::AllDockWidgetFeatures );

    addDockWidget( Qt::LeftDockWidgetArea, m_pWorkspaceDockWidget );
    m_pWorkspaceDockWidget->setBackgroundRole( QPalette::Button );
    m_pWorkspaceDockWidget->setMinimumHeight( 400 );
    m_pWorkspaceDockWidget->setMaximumWidth(150 );
    m_pWorkspaceDockWidget->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea);
    m_pWorkspaceDockWidget->adjustSize();

    [/html]

  6. #6
    Join Date
    Aug 2006
    Posts
    83

    Default Re: QTabWidget - problem with resizing

    This is not the answer to my question, I want to have a minimum size, and when in vertical position I want it be the default size, while still having the chance to expand and when it is in horizontal position i want it to have as much space as possible while still having the chance to make it smaller

Similar Threads

  1. QDockWidget/Central Widget Problem
    By Lemming in forum Qt Programming
    Replies: 7
    Last Post: 3rd April 2016, 09:52
  2. Problem with resizing dialog
    By Seema Rao in forum Qt Programming
    Replies: 8
    Last Post: 5th May 2006, 17:27
  3. Problem with bitBlt
    By yellowmat in forum Newbie
    Replies: 1
    Last Post: 5th April 2006, 14:08
  4. Replies: 16
    Last Post: 7th March 2006, 15:57
  5. Widget resizing problem
    By fwohlfert in forum Qt Programming
    Replies: 3
    Last Post: 23rd February 2006, 08:16

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.