Create Arrow Button in Qt Designer? - pyqt

In Qt Designer I can only drag the ToolButton from Widget box. The generated code will look like this.
self.toolButton = QtWidgets.QToolButton(Frame)
self.toolButton.setGeometry(QtCore.QRect(350, 480, 26, 22))
self.toolButton.setObjectName("toolButton")
The button will look like this:
I want it to be an arrow button. For it to be an arrow button, I can do like this:
self.toolButton.setArrowType(QtCore.Qt.UpArrow)
My question is, how can I make the arrow button directly in QtDesigner without changing any code ?

Its in the settings for the tool button on the right hand side

Related

Hide bottom border from QtDesigner designed UI

I have created a very simple UI with the QtDesigner (using pyqt5) and everything is ok except that there is a non-usable whitespace-border on the bottom of it. <
Does anyone have any idea how to remove this border - or write a simple sentence on it (something like Alt + F11 -> toggle)?
Is the above possible from within the QtDesigner environment?
Since you are using the QMainWindow as a window then that blank space is the QStatusBar, if you want to remove it then right click on the window and select "Remove Status Bar":
If you want to add then you must right click and select "Create Status Bar".

Expanding button to autosuggestbox in UWP

I am trying to configure a button within my UWP app to expand in to an AutoSuggestBox on click. This behavior is mentioned in this post:
https://msdn.microsoft.com/en-us/windows/uwp/controls-and-patterns/search#Implementation
I tried utilizing a flyout on the button click, but it doesn't give me the desired effect. Is there an existing control that can do this or will I need to roll my own XAML of an existing control?
The behavior you see in the blogpost can be easily achieved by having an autosuggestbox hidden behind the button, then after on button click fading out the button and resizing the autosuggestbox to the desired width.
There's no way to "expand" a control into a different one, but you can make it look like that happens :)

fltk widget order, button is hide under another widget

I am using fltk 1.3.2.
I have two widgets, one of them is Fl_Multiline_Output and other one is Fl_Button.
The button is a place on the the multiline_output.
When I click multiline_output, the button is disappeared.
I need to use always on top like speciality for my button.
It mustn't be hide.
Does anyone know fltk support this?
I have changed Fl_Multiline_Output to Fl_Text_Display, I put the text and deactivated it. Now, when I click Fl_Text_Display nothing is happen.
I changed to Fl_Text_Display because if I deactivate the Fl_Multiline_Output object, text color is changed. I chose Fl_Text_Display there is no problem with text color.

How to add gravity for button CompoundDrawable in android?

I am developing android application with some custom views. Here i am adding buttons with CompoundDrawable in one of my view. Here i am giving CompoundDrawable for buttons to give bullets effect for the text. But i am facing problem with CompoundDrawable alignments.
If my button text is single line then alignment is showing good. Button text is more that 2 line that will show my bullet in incorrect place. At any way i would like to show my bullet CompoundDrawable at left-top of my button text.
Here is my button creating code
Button button = new Button(this);
button.setLayoutParams(myParams);
button.setCompoundDrawablesWithIntrinsicBounds(drawableId, null, null, null);
button.setBackgroundResource(0);
button.setGravity(Gravity.LEFT|Gravity.TOP);
But it is not showing my button what i would like to show.
I have attached image of my buttons. On that 1 is proper. but i would like to show 2, 3 also same like button 1.
Please look on attached image.
Thanks in advance.
make use of android layouts........

How create drop down menu, use LWUIT? What solutions exist?

I need to create drop down menu (see the picture). What methods are there? What should I use?
LWUIT 1.5 includes a popup dialog which does exactly that. It also has the ability to use an arrow border when specified. See the LWUITDemo's Dialog demo.
Create a class which derives Dialog , and add a List inside that Dialog. When you click the button then show the Dialog with the four params top, bottom, left and right.
To draw the triangle of the drop down menu just implement the paint method when you derive Dialog in which you call :
super.paint(g);
g.drawLine(x1,y1,x2,y2);
g.drawLine(x3,y3,x4,y4);

Resources