1 Attachment(s)
auto resize component in main window when main windows is resized
Dear all, I know this is kind of newbie question. But I tried to search forum but can not find the solution. Below is the capture of my main windows.
http://www.qtcentre.org/forum/attach...1&d=1218381404
Basically the left hand side is a label(please select file....) and right hand side is a tab. When user use this application and change the size I want the label to expand horizontally and vertically to fit the screen. And the tab to expand vertically. Can anyone suggest me how to do that ??
And if possible, can I hide the tab first and when people move the mouse near it then show it ( like a windows autohide task bar ) ???
thank in advance
Re: auto resize component in main window when main windows is resized
Quote:
Basically the left hand side is a label(please select file....) and right hand side is a tab. When user use this application and change the size I want the label to expand horizontally and vertically to fit the screen. And the tab to expand vertically. Can anyone suggest me how to do that ??
change sizePolicy for tabWidget Horizantal=Fixed.
Re: auto resize component in main window when main windows is resized
I tried, that would fix the tab. But how to automatically expand it(vertically) when user change the main windows size ?
Re: auto resize component in main window when main windows is resized
did you put label and tab in layout?
Re: auto resize component in main window when main windows is resized
Quote:
Originally Posted by
spirit
did you put label and tab in layout?
No. And I just tried to put label and tab in horizontal layout. But no different. It is still not expand automatically when main windows is expand.
Re: auto resize component in main window when main windows is resized
1 Attachment(s)
Re: auto resize component in main window when main windows is resized
Dear spirit, I have attached my ui file. Thank a lot for helping :D
1 Attachment(s)
Re: auto resize component in main window when main windows is resized
Re: auto resize component in main window when main windows is resized
sorry, I forgot one more: in SizePolicy of tabWidget you should set next values:
hSizeType == Fixed (was initial)
vSizeType == Preferred
Re: auto resize component in main window when main windows is resized
Thank a lot spirit !! It's work. :D:D:D:D
Can you explain what I did wrong -.-
Re: auto resize component in main window when main windows is resized
you set layout for label and tabWidget wrong. you would better click on widget and select "Lay out->Lay out Horizantally" from context menu.
Re: auto resize component in main window when main windows is resized