How to always fix the button to the right side using QtDesigner?
-
@JonB The main screen has a layout in lines, only has 2 lines: the text editor and the bottom bar. Only this line layout is set in this GUI
wrote on 2 Sept 2022, 20:51 last edited by@_jao_victor_
Put the bottom bar and the button in a horizontal layout. -
@_jao_victor_
So what have you done in the designer to tell it where you want the button?Also you say
where a button always needs to be fixed to the right side of the screen,
the button does not follow the right edge of the screen.and also
fix the button to the left side using QtDesigner
the button should not be in the middle of the bar but pasted to the left edge of the GUIso I don't know which you want.
wrote on 3 Sept 2022, 17:54 last edited by@JonB sorry, it was a dgitation error. I edited my question.
-
@JonB sorry, it was a dgitation error. I edited my question.
wrote on 3 Sept 2022, 18:01 last edited by@_jao_victor_
Your title and first line read:How to always fix the button to the left side using QtDesigner?
GUI where a button always needs to be fixed to the right side of the screen
Those do not seem consistent to me. As per @mpergand, are your "bottom bar and the button in a horizontal layout"?
-
@_jao_victor_
Your title and first line read:How to always fix the button to the left side using QtDesigner?
GUI where a button always needs to be fixed to the right side of the screen
Those do not seem consistent to me. As per @mpergand, are your "bottom bar and the button in a horizontal layout"?
wrote on 3 Sept 2022, 18:49 last edited by@JonB maybe, this will help you understand my layout.
-
@_jao_victor_
Your title and first line read:How to always fix the button to the left side using QtDesigner?
GUI where a button always needs to be fixed to the right side of the screen
Those do not seem consistent to me. As per @mpergand, are your "bottom bar and the button in a horizontal layout"?
wrote on 3 Sept 2022, 19:18 last edited by@JonB in the frame of the bottom bar has no vertical or horizontal layout
-
@JonB in the frame of the bottom bar has no vertical or horizontal layout
wrote on 3 Sept 2022, 20:16 last edited by@_jao_victor_
And the "red no entry" symbol Designer shows on theQFrame
warns you that it needs a layout. -
@_jao_victor_
And the "red no entry" symbol Designer shows on theQFrame
warns you that it needs a layout.wrote on 3 Sept 2022, 21:19 last edited by@JonB what layout do you need to use in which it is possible to achieve my goal?
-
@_jao_victor_
Put the bottom bar and the button in a horizontal layout.wrote on 3 Sept 2022, 21:31 last edited by JonB 9 Mar 2022, 21:32@mpergand said in How to always fix the button to the right side using QtDesigner?:
@_jao_victor_
Put the bottom bar and the button in a horizontal layout.Then if you want the button on the right, I can't remember whether the layout allows you to right align, or put a stretch to the left if not.
-
@mpergand said in How to always fix the button to the right side using QtDesigner?:
@_jao_victor_
Put the bottom bar and the button in a horizontal layout.Then if you want the button on the right, I can't remember whether the layout allows you to right align, or put a stretch to the left if not.
wrote on 3 Sept 2022, 22:25 last edited by@JonB said in How to always fix the button to the right side using QtDesigner?:
I can't remember whether the layout allows you to right align,
Yes you can.
Now, this bottom bar ressembles very much to a QStatusBar in a QMainWindow and you can add any widget to it with:
addPermanentWidget(QWidget *widget, int stretch = 0) -
@JonB said in How to always fix the button to the right side using QtDesigner?:
I can't remember whether the layout allows you to right align,
Yes you can.
Now, this bottom bar ressembles very much to a QStatusBar in a QMainWindow and you can add any widget to it with:
addPermanentWidget(QWidget *widget, int stretch = 0)wrote on 3 Sept 2022, 22:42 last edited by -
wrote on 3 Sept 2022, 22:52 last edited by
now the button is central
-
now the button is central
wrote on 3 Sept 2022, 23:56 last edited by@_jao_victor_
Right-click on the button and choose :
Layout Alignment->Right -
@_jao_victor_
Right-click on the button and choose :
Layout Alignment->Rightwrote on 4 Sept 2022, 00:26 last edited byThis post is deleted! -
@_jao_victor_
Right-click on the button and choose :
Layout Alignment->Rightwrote on 4 Sept 2022, 00:26 last edited by@mpergand the alignment layout is not selectable, what will be the reason?
14/18