Important: Please read the Qt Code of Conduct -

Bug at QTabWidget / QWidget resizeEvent ?

  • Hi!

    Since versions up to Qt 5.12.0 , all my Widget and Tab Widgets enter in a Infinite resizeEvent....

    Becouse i have a lot of Scatter Graphics and Charts on my TabWidget , everytime o open the system all the charts and graphics start to recelculate their sizes causing performance impacts.

    This is a problem for me , since i suppose the resizeEvent only happen when we resize the window...

    Anyone know if the things change about this? This is a correct behaviour on the Widgets now?

    PS:. I debbug the code some more times and i detect another strange behaviour. this infinite resize event happen and the size of the screen are being changed too!

    Kind Regards.

  • Lifetime Qt Champion

    Could you test with Qt5.13 and see if still happens ?
    Also what platform ? windows/linux/mac?

    As far as i know, nothing was changed regarding when resizeEvent is called.

  • Hi, Yes.

    I test the same program with all versions since 5.11.3 , and in all versions after 5.11.3 (5.12.x and 5.13.0) this behaviour happen.

    I´m using the Windows Plattform and using MinGW.

    The only difference related to plattform is the compiler being used, when in the 5.11.3 version i use MinGW 530 and in the other versions the compiler MinGW 730 are being used.

    Kind Regards.

  • Lifetime Qt Champion


    Can you provide a minimal compilable example that reproduces that behaviour ?

  • Hi SGaist!

    I´m Trying to do that, becouse to reproduce the behaviour i need build a new CWindow with two docking QTabWidgets (One for the Left and Other as Central Widget).
    My problem are focused on the Central Docking Widget where i have 4 Widgets on the TabWidget.

    I´m receiving many strange behaviours from it, listed below:

    • When i click on the tabs that have QCharts,Q3DScatter3DGraphics , the resizeEvent of the QMainWindow is estimulated.
    • When i implement the resizeEvent of the Widgets involved (QMainWindow and TabWidgets) the behaviour changes.

    Another strange detail is about the documentation of the QTabWidget, where tell us to not provide a Parent Pointer in the TabWidgets.
    Usually i not code myself this events and on the initialization for all Widgets i pass the Parent Pointer this.

    So i believe there is something related with the treatment being made internally by Qt
    whith the parent/child pointers, ore something like that.

    I only post this topic here becouse if i compile my system in the older version, the system works like a charm... :)

    When i finish the Prototype i send here , ok?

    Kind Regards.

  • Hi!

    I not find what cause the behaviour, but reimplementing the resizeEvent() in all the Widget "Tree" (Becouse there a lot of Widgets inside of other Widgets) , The Strange behaviours start to stop.

    So, for me i will reimplement this to not worry about it in future.

    Thanks a lot for any help anyway. ;)

    Kind Regards.

Log in to reply