1

Topic: Operation with QTabWidget

Good afternoon, Misters. It would be desirable to understand following problems. 1. Is available QTabWidget in a primary window. Thus QTabWidget contains some dial-up of buttons (), allocated on  one after another 1> 2> 3> 4> 5 At narrowing of a primary window it decreases until then (on ), does not reach yet the button () number 5. I made the mechanism which defines button boundary () number 5 and for 10 pixels, before approach to it of narrowed down boundary of a primary window the button () becomes the invisible. If to release the mouse button and to push it again, to narrow down further a window, narrowing happens correctly to the button () number 4 and if not to release the mouse button and to try to narrow down a window after the button () number 5 became  the window does not allow it to make, it to be stopped. I already made both for a window and for QTabWidgeta: update (); updateGeometry (); Fruits any did not receive, what it is necessary to update, that narrowing proceeded, after  become invisible sequentially? 2. Operation happens all in the same window all to the same narrowing, I catch narrowing of a window by window function: resizeEvent (QResizeEvent* event) and in this function I try to define the cursor: QCursor* cursor = qApp-> overrideCursor (); if (cursor) {Qt:: CursorShape shape1 = cursor-> shape (); int x = 0;} Qt:: CursorShape shape = this-> cursor ().shape (); if (this-> cursor ().shape () == Qt:: SizeHorCursor) int x = 0; but the cursor produces value ArrowCursor. Why? In advance thanks!

2

Re: Operation with QTabWidget

Hello, TOPAZ23, you wrote: Similar the button disappears, but the minimum admissible size of the form is not enumerated. It becomes complicated because of  even more. I would begin with that achieved compression of the form till minimum sizes with leaving of buttons abroad a window. For this purpose it is necessary to tear off buttons and them  from the general policy . It is necessary to create  buttons with =0 and  manually.

3

Re: Operation with QTabWidget

Hello, Qt-Coder, you wrote: QC> Hello, TOPAZ23, you wrote: QC> Similar the button disappears, but the minimum admissible size of the form is not enumerated. It becomes complicated because of  even more. QC> I would begin with that achieved compression of the form till minimum sizes with leaving of buttons abroad a window. For this purpose it is necessary to tear off buttons and them  from the general policy . It is necessary to create  buttons with =0 and  manually. It is possible was more specific about recalculation, just now to it came. Functions setSizeHint at the button () are not present how to be, it is possible an example with the code?

4

Re: Operation with QTabWidget

Hello, TOPAZ23, you wrote: QPushButton * btn1 = new QPushButton ("btn1", this); btn1-> setMinimumWidth (200); QPushButton * btn2 = new QPushButton ("btn2", this); btn2-> setMinimumWidth (200); QWidget * wid1 = new QWidget (this); wid1-> setMinimumSize (420, 64); QHBoxLayout * hb = new QHBoxLayout; hb-> addWidget (btn1); hb-> addWidget (btn2); wid1-> setLayout (hb); If not to add wid1 in layout the form it will not restrict its sizes.

5

Re: Operation with QTabWidget

Hello, TOPAZ23, you wrote: TOP>... TOP> but the cursor produces value ArrowCursor. Why? TOP> in advance thanks! It is not necessary to define such things through a cursor state.

6

Re: Operation with QTabWidget

Hello, SaZ, you wrote: SaZ> Hello, TOPAZ23, you wrote: TOP>>... TOP>> but the cursor produces value ArrowCursor. Why? TOP>> in advance thanks! SaZ> it is not necessary to define such things through a cursor state. I understood it already, thanks. And apropos  main thing windows what you will tell?

7

Re: Operation with QTabWidget

Hello, Qt-Coder, you wrote: QC> Hello, TOPAZ23, you wrote: QC> QC> QPushButton * btn1 = new QPushButton ("btn1", this); btn1->> setMinimumWidth (200); QC> QPushButton * btn2 = new QPushButton ("btn2", this); btn2->> setMinimumWidth (200); QC> QWidget * wid1 = new QWidget (this); wid1->> setMinimumSize (420, 64); QC> QHBoxLayout * hb = new QHBoxLayout; hb->> addWidget (btn1); hb->> addWidget (btn2); wid1->> setLayout (hb); QC> QC> If not to add wid1 in layout the form it will not restrict its sizes. At me all too most, only through GridLayout: QGridLayout* gl = new QGridLayout (this); QPushButton pb1 = new QPushButton (); QPushButton pb2 = new QPushButton (); QPushButton pb3 = new QPushButton (); QPushButton pb4 = new QPushButton (); QPushButton pb5 = new QPushButton (); gl-> addWidget (pb1, 0,0); gl-> addWidget (pb1, 0,1); gl-> addWidget (pb1, 0,2); gl-> addWidget (pb1, 0,3); gl-> addWidget (pb1, 0,4); but effect  not , it is necessary to release a mouse and to clamp the left button again, sequentially to close sections pb5-> pb4-> pb3-> pb2-> pb1

8

Re: Operation with QTabWidget

Hello, TOPAZ23, you wrote: SaZ>> it is not necessary to define such things through a cursor state. TOP> I understood it already, thanks. And apropos  main thing windows what you will tell? I will tell nothing, at all did not understand plainly that is necessary. But very much smells .

9

Re: Operation with QTabWidget

Hello, SaZ, you wrote: SaZ> I will tell Nothing, at all did not understand plainly that is necessary. But very much smells . Actually the interesting decision. If something not  in window borders to hide it.  instead compress/rasshirjaejut buttons () if it is set by a policy. Or restrict minimum sizes of a window. In documentation Qt there is decision FlowLayout - it at window compression throws  on a line more low. The HARDWARE is necessary something on the basis of it only not to throw, and to hide .

10

Re: Operation with QTabWidget

Hello, Qt-Coder, you wrote: QC> Hello, SaZ, you wrote: SaZ>> I will tell Nothing, at all did not understand plainly that is necessary. But very much smells . QC> Actually the interesting decision. If something not  in window borders to hide it. QC> Lejauty instead compress/rasshirjaejut buttons () if it is set by a policy. Or restrict minimum sizes of a window. QC> in documentation Qt there is decision FlowLayout - it at window compression throws  on a line more low. QC> the HARDWARE is necessary something on the basis of it only not to throw, and to hide . Here that that is necessary the author: nen777w Date: 24.10.16, from nen777w. Is able to hide the text when it not .