enamlx icon indicating copy to clipboard operation
enamlx copied to clipboard

Plots within a DockArea sometime leads to borked, overwide widgets

Open Tillsten opened this issue 3 years ago • 0 comments

Starting with the a simple three plot DockArea, everything looks fine initally. But after moving the docks around the widgets get really wide, sometimes even given errors like QWindowsWindow::setGeometry: Unable to set geometry 2701x1346+2560+34 (frame: 2723x1402+2549-11) on QWidgetWindow/"obj-2358999064256Window" on "\\.\DISPLAY2". Resulting geometry: 2560x1346+2560+34 (frame: 2582x1402+2549-11) margins: 11, 45, 11, 11 minimum size: 2701x819 MINMAXINFO maxSize=0,0 maxpos=0,0 mintrack=2723,875 maxtrack=0,0).

I am not even sure if this is an enamlx or enaml bug.


enamldef ShaperView(Container):
    attr model


    DockArea:
        layout = VSplitLayout('a', 'b', 'd')
        DockItem:
            name = 'a'
            title = 'Amplitude'
            PlotArea:
                PlotItemArray:
                    x << model.x
                    y << model.amp

        DockItem:
            name = 'b'
            title = 'Phase'
            PlotArea:
                PlotItemArray:
                    x << model.x
                    y << model.phase
        DockItem:
            name = 'd'
            title = 'RF Waveform'
            PlotArea:
                PlotItemArray:
                    x << model.x
                    y << model.rf

enamldef ShaperWindow(MainWindow):
    attr model
    ShaperView:
        model = parent.model

Tillsten avatar Sep 13 '21 11:09 Tillsten