Sliding a frameless window in and out of screen edge in qml - qml

As the title says, I want to move, clicking a button in task bar , a frameless window out and in of screen right edge .One way to achieve this under kde neon in QML, is to create a PlasmaCore.Dialog{} window and setting as flags the Qt.X11BypassWindowManagerHint only, so the window manager is bypassed.The problem with this solution is that, inside window, where i "append" some widgets in a ListView, I can not have activeFocus to TextArea and I can not type anything there. The TextArea gains activeFocus only if I use as flags the Qt.Popup only without Qt.X11BypassWindowManagerHint.
So is there an alternative solution of making the window sliding in an out from screen right edge without using the flags of Qt.X11BypassWindowManagerHint? In the below link is the code I am using now for sliding window:
https://gist.github.com/cgiannakidis70/8a0ea61d7f18e803381159d7456e2135
EDIT 1
After a lot trying and error I found that the use of flags Qt.BypassWindowManagerHint and Qt.Popup do the trick.Now I can slide the window outside screen edge and also type in TextArea inside a widget .

Related

pyglet window resize - problem when maximizing / restoring window

I am building a simple menu bar for my Pyglet app. I would like to stick the menu on the top left corner of the window, and also I would like my menu to have the same width of the window but fixed height.
So what I've done is to add a local_on_resize method that calls my menu resize method that performs all the necessary transformations.
def local_on_resize(self, x, y):
self.menu.resize(self.width, self.height)
and this method is pushed in this way in the window constructor:
self.push_handlers(on_resize=self.local_on_resize)
This seemed to work, as if I try to resize the window by dragging the borders of my window the menu gets resized correctly. The problem comes when I try to maximize/restore my window. In fact when I click on the maximize button the window gets maximized but I get a black screen (the menu bar disappears). However, if I try to click anywhere, or raise any event, the menubar reappears correctly. Same thing for restore button: if I restore my window, the menubar disappears but it gets back if I click on the window. So what I see if that the resize mechanism seems to work when I resize the window "continuously" by dragging it, but doesn't work when I maximize/restore it.
Does anybody know how can I fix this?

update KeyboardAvoidingView after a layout change

I have a form in my app that has a floating bar with buttons that animates into the view at the bottom of the window when the user makes any change to any of the data in the form. I have this bar rendering relative to the height of the window so it knows when the keyboard is open or closed and will attach to wherever the bottom of the view window is at any give time.
The issue I have is the form is wrapped in a KeyboardAvoidingView around the form with a behavior of padding and this all works great, however when I make my change and my floating button bar comes up, because the input is at the bottom of the window the bar now covers up the input I'm typing in.
I haven't been able to find a way to fix this yet. I tried disabling the KeyboardAvoidingView I assume that maybe I need to somehow tell the view about this bar that's covering up part of the view but I'm not sure how I do that.
here is a snapshot of what this looks like for reference...

Intellij documentation popup hides warning popup

In the Intellij Settings I activated Editor > General > Show quick documentation on mouse move and I like it. But when there is a warning message also shown as popup when the mouse hovers over, then the documentation popup just hides the warning like this:
Well, that's not nice. Is there a way to solve that?
The are a couple of alternatives to displaying the quick documentation as a popup:
Display the quick documentation in a separate panel.
Display the quick documentation in a floating window.
To display the quick documentation in a separate panel:
Position the mouse so that the quick documentation popup is displayed.
Click the Options icon in the bottom right of the popup.
Select Open as a Tool Window from the drop down menu.
After doing that the quick documentation popup is displayed in a panel on the right. It is still automatically updated as you move the mouse.
Alternatively, to display the quick documentation as a floating window:
Click the Options icon in the top right corner of the panel.
Select Windowed Mode from the drop down menu.
After doing that the quick documentation is shown as a floating window which you can position wherever you want. You could even place it on another screen if you have multiple screens. Again the content is still automatically updated as you move the mouse.
Select Open as a Popup from the Options drop down menu on the panel or the floating window (or press CTL/Q) to revert to using a popup for the quick documentation.
The best choice is a matter of personal taste, but both of those approaches would solve your overlapping popups problem.
Update:
The previous screen shots were produced using IDEA Ultimate 2018.1 EAP. With Ultimate 2017.3 it seems that the situation is slightly different. After clicking the Options icon, only a control to adjust the font is shown. In that case click the Pin icon in the top right of the window:
After doing that click the Options icon in the top right of the window to see the menu options:

I want to Click , Drag and Move a button on the pygtk window

I managed to find a sample code for Images as described in the following link .
How to drag images with pygtk
However when I use it for a button doesn't seem to work .
What the original link does:
It moves (pans) the image inside a 'Scrolled Window' widget. The widget doesn't change places, only the image with respect to the widget.
If you want to move the button itself, that is more complicated! It is easier if you use the 'fixed' layout manager, where the buttons are located in absolute coordinates (as opposed to the 'normal' layout manager where all widgets are 'packed' alongside each other. There you should use drag and drop. You have to prepare the entire application for 'receiving' the button, and what to do with it when it gets there. This involves many steps! ).
Have a look at the gtk.Fixed widget's documentation.

Selenium IDE - selecting an button outside the frame

I am relatively new to Selenium. We are using the Selenium IDE to do some regression testing. I have a menu bar that has different buttons on it that will drop down a menu when you hover over any of the buttons (there are 4 buttons on the menu bar). So when i select one of the menu items from the dropdown, it opens a page inside the same window. This page looking at the debug info in Selenium seems to be a frame. This frame open right under the menu bar and the menu bar is still visible. Once the page has loaded completely, I want to go outside the frame and click on a button on the menu bar and click on the next item to verify. This doesnt seem to work, once the page (frame) has loaded then nothing happens. I have tried using window focus, select frame, mouse over commands but nothing seem to work. i have also used the relative = parent and relative = top commands with the select frame command but cant get it to work.
Any tips or suggestions are welcome. If I am not clear on the description I can provide more details. Thanks for the assist.
If the control is outside of the frame Selenium is pointing to, then you need to switch back to default content, and possibly switch to the frame the control is in.
Driver.SwitchTo().DefaultContent();
Driver.SwitchTo().Frame(frameID);
you should firstly switch to appropriate frame where your button is located in:
1. Switch to frame
Command: selectFrame
Target: your_frame_id
2. Click button
Command: click
Target: your_button_id (or you can use XPath or CSS selector instead)