How to always fix the button to the right side using QtDesigner?
-
@JonB sorry, it was a dgitation error. I edited my question.
@_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"?
@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"?
@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
@_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.@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.@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.
@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) -
now the button is central
-
now the button is central
@_jao_victor_
Right-click on the button and choose :
Layout Alignment->Right -
@_jao_victor_
Right-click on the button and choose :
Layout Alignment->RightThis post is deleted! -
@_jao_victor_
Right-click on the button and choose :
Layout Alignment->Right@mpergand the alignment layout is not selectable, what will be the reason?