snu-quiqcl / qiwis

QuIqcl Widget Integration Software
MIT License
5 stars 2 forks source link

Support a tab structure #211

Closed BECATRUE closed 10 months ago

BECATRUE commented 11 months ago

This PR will close #196.

I supported a tab structure, not showing in a row.

image

BECATRUE commented 11 months ago

I will modify the unittest after implementing the central widget.

BECATRUE commented 10 months ago

Then, is there something to modify? @kangz12345

kangz12345 commented 10 months ago

I will modify the unittest after implementing the central widget.

Is the unit test error expected?

BECATRUE commented 10 months ago

Is the unit test error expected?

No😮 I realized it just before and tried to fix it, but only unittest for Python 3.11 was failed.

BECATRUE commented 10 months ago

I found out the soluting using patch.object().

kangz12345 commented 10 months ago

Why was it a problem only in 3.11? Do you know the exact cause?

BECATRUE commented 10 months ago

Why was it a problem only in 3.11? Do you know the exact cause?

Oh, I resolved it! I don't know the exact reason, but it looks like I did the wrong mocking.

BECATRUE commented 10 months ago

Please check this! @kangz12345 @Aijuh

kangz12345 commented 10 months ago

I have 2 questions:

  1. When we create an app at e.g. bottom and there were several frames (several columns), which one is tabified?
  2. When we destroy an app whose frame was at e.g. bottom and there were 2 frames, will the remaining 1 frame be in a tab or not?
BECATRUE commented 10 months ago

When we create an app at e.g. bottom and there were several frames (several columns), which one is tabified?

In my simple test, a new frame is created in the frame with the latest added frame, because I used tabifyDockWidget() with the last element of areaDockWidgets as follows:

self.mainWindow.tabifyDockWidget(areaDockWidgets[-1], dockWidget)

If I use the first element areaDockWidgets[0], the frame is created in the frame with the first added frame as we expect.

BECATRUE commented 10 months ago

When we destroy an app whose frame was at e.g. bottom and there were 2 frames, will the remaining 1 frame be in a tab or not?

The remaining one is not in a tab, but just a single docked widget. It seems that PyQt doesn't support a tab with only a frame.

kangz12345 commented 10 months ago

Thank you for the confirmation!

BECATRUE commented 10 months ago

Please re-check this PR! @Aijuh