[CLOSED] QMDiArea keeps re-sizing subwindows in QMdiArea::TabbedView view mode.



  • I was surprised that QMDiArea keeps re-sizing subwindows in QMdiArea::TabbedView view mode during activation/deactivation.

    This makes it useless in such mode for any slow repainting widget ( like QVtkWidget ) and even relevantly fast drawing widgets in case of multiple tabs display flickering.

    Anybody knows a solution for this?
    The only alternative I see right now write it from the scratch replacing .QMdiArea::TabbedView implementation with regular QTabBar or QTabWidget

    Regards,
    Alex



  • The effect I am trying to avoid is flickering which happens when user clicks tab due to implementation of MDI which seems changes tab, then for some reason re-size the active window first to minimum size then shows and maximize windows which is going to become active instead just hiding and showing window as needed re-sizing only hidden window before it is going to become active if necessary.

    Anybody knows any 3rd party library which does it right?
    I can recall QextMDi which was doing it for Qt3.



  • Try setting the QMdiArea::DontMaximizeSubWindowOnActivation option.
    @
    /*!
    When the active subwindow is maximized, the default behavior is to maximize the next subwindow that is activated. Set this option if you do not want this behavior.
    */
    enum AreaOption {
    DontMaximizeSubWindowOnActivation = 0x1
    };
    @



  • DontMaximizeSubWindowOnActivation flag is irrelevant to the problem.
    If you remove this flag you will see regular window shown below tab in a tab view. Basically it will separate tab and view.

    TabView has to show window maximized,
    but what it also does it minimize window when window is deactivated which does not make sense cause only ONE window is visible in such case at a time.

    Normal behavior would be just hiding it, then when window has to be activated move it when hidden at proper location then show new active tab and window (similar to what happens in QTabWidget.

    QMainWIndow instead follows procedure which makes sense for case when multiple windows are visible at the same time.



  • Whole problem seems related to the windows scheme/opacity.
    If classic window scheme is selected user do not see windows blinking behind mdi area when changing tabs



  • To be more precise problem is related to Qt::WA_PaintOnScreen
    flag set to QVtkWidget.
    At least setting it to false fixes it.
    Weird is that according to documentation on 4.8.6 states that
    This flag is only supported on X11 and it disables double buffering.
    Looks like a breach in documentation.
    I guess I will have to check vtk sources to see if anybody found workaround.



  • I am going to close topic since it is seems is not related to QMdiArea but more to subwindow widget attributes.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.