QWidget with QTabWidget
-
@ixion I may be wrong but as far as I know size policy works only for widgets put inside layout. The last line is a do nothing line as 'this' is not child of any layout (and it cannot be). Best thing to do I think is to set main widget size manually.
-
@ixion without being in a layout, as far as I know, there's nothing. I think you will have either to live with your main widget not risizing automatically, or implement that auto resize by yourself (by adding the width of all tabs + some constant should be what you need).
-
@ankou29666 said in QWidget with QTabWidget:
without being in a layout, as far as I know, there's nothing. I think you will have either to live with your main widget not risizing automatically, or implement that auto resize by yourself (by adding the width of all tabs + some constant should be what you need).
thanks
-
-
@JonB said in QWidget with QTabWidget:
I have only used Qt on Linux. My impression was that it never auto-grows a top-level window, at least when you put more content into it, i.e. like the left-hand one.
Since on linux, the length of the tab titles are not taken into account, the overall size of the tab widget reflects the widest element present in the tab pages.
On mac, the minimum size of the tab widget depends of the length of the tab titles.
Otherwise the tab titles are troncated with ellipsis, very ugly.