Hide bottom border from QtDesigner designed UI - pyqt

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".

Related

What is the place where we write code and the right menu called in Brackets?

I use brackets but I don't know the names of the place where you write code
and the right bar that contains some buttons (e.g Live Preview and Extension Manager) menus.
The red thing you marked is called editor. The left menu and right panel are called toolbars or sidebars.
Honestly you don't even need to know these menu names (maybe except the editor).

How do I set the function to automatically go to that code when I click the widget from flutter to the inspector?

How do I set the function to automatically go to that code when I click the widget from flutter to the inspector?
develop environment is Android Studio.
Not sure what you are asking, perhaps you want to hold down control or command, depending on your OS, and left click.
Usually that takes you to the code referring to that function or class.
If you are using VSCode editor, you can do it with CTRL (command in macOS) + left click. When you hover your mouse to Widget's name, for example, it will highlight the text and then you can click it. It will bring you to the Widget class

PyAutoGui - locate doesn't see the right-click menu

I have the code below that basically identify the small chrome icon in the windows toolbar, right-click on it using pyautogui and then it should locate the "New Window" option. The problem I face is that, even if I take a screenshot after the right-click, the small menu doesn't show up, making it impossible to locate the "New Window" option.
# this part works
chrome_small_icon = r"C:\Users\chrome_small_icon.png"
elem = pyautogui.locateOnScreen(chrome_small_icon)
elem_center = pyautogui.center(elem)
pyautogui.click(elem_center, duration=0.5, button="right")
time.sleep(0.5)
im_after_right_click = pyautogui.screenshot()
# this part finds zero element, reason being, the right-click menu is like a ghost...
chrome_new_window = r"C:\Users\new_window_text.png"
elements = pyautogui.locateAllOnScreen(chrome_new_window)
does anybody have any suggestion about how to locate elements inside the menu that appears when we right click on an element?
Thanks
EDIT
it seems this issue happens only if I right click on the windows toolbar. It does work if I right click on other locations of the screen.
Instead of trying to locate the new window text use the keyboard to select the new window option. I just ran the following code on MacOS and I was successfully able to open a new Chrome window:
import pyautogui
import time
pyautogui.rightClick(pyautogui.center(pyautogui.locateOnScreen('chrome.png')))
#chrome.png is an image of the chrome icon
pyautogui.typewrite('new window')
pyautogui.press('enter')

What is QT-Creator's equivalent to WinForms Dock-Fill?

I have a QTreeView widget placed inside a QDockWidget:
I want to set the properties of the QTreeView, that it automatically fills the whole available client drawing area (similar as WinForms DockFill property).
How can this be achieved with the QT-Designer?
Note: I've been playing around with the QTreeViews sizePolicy properties. If these are set to Expanding (as is the default) the accepted answer works out out of the box.
In Qt Designer, right-click the dock-widget, and then select Lay out -> Lay Out Vertically from the menu. Or you can just click on the dock-widget to select it, and then use the equivalent layout toolbar buttons.
If you want to maximise the space taken up by the tree-view, select the first child widget of the dock widget (it will probably be shown as dockWidgetContents in the Object Inspector pane). Then scroll down to the bottom of the Property Editor, and reset all the margins to zero.

Move command in Dialog based aplications

I working on Dialog based applications once i right click on the Dialog Title bar a drop down list is coming with two options 1. Move and 2. Alt+F4 close. Once the User Press Move and he can able to drag the window as he desired and I add the On NC Hits Test to stop dragging its stopping normal dragging but it is not working in this particular context can any body help me in fixing this Bug.
When the user use the keyboard interface, he can move a windows with the arrow keys, without using the mouse.
If you want to limit the position of your dialog, process the WM_MOVING message.

Resources