Frameless | The spiritual successor to Less Framework
kandi X-RAY | Frameless Summary
kandi X-RAY | Frameless Summary
See for more information.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of Frameless
Frameless Key Features
Frameless Examples and Code Snippets
Community Discussions
Trending Discussions on Frameless
QUESTION
Im designed a form in qt designers
I also make my program frameless with using Qt::FramelessWindowHint
and Qt::WA_TranslucentBackground
currently I coded drag windows manually in my program in this way
ANSWER
Answered 2021-May-15 at 08:56after some more searching I finally found this on github its exactly what I wanted.
QUESTION
There are many question on StackOverflow about detecting whether an iPhone device has a notch in the screen, such as this one. The answers almost always recommend using the safeAreaInsets
property of the top window. I have used that in my app to determine whether a status bar should be shown, from the prefersStatusBarHidden
method of the currently shown view controller. I would like to show the status bar when there is a notch, but not when not. It works fine in all my tests, but for some customers the status bar disappears sometimes, even though they use a device with a notch (an iPhone 12 Pro Max).
I looked into it, and I think the problem is probably caused by a recursive call to safeAreaInsets
, see following call-stack:
It makes some sense. In order to determine how large the safe area needs to be, iOS needs to know whether the status bar needs to be shown. And therefore, it calls prefersStatusBarHidden
of the visible view controller, which then uses the safe area to determine that....
Despite the recursive call, it still works for me in tests, but as said, it fails sometimes for some users. I need to work with prefersStatusBarHidden
, because at top-level the app consists of a UITabBarController
, for which only one tab hides the status bar. The other tabs should always show the status bar, independent of whether there is notch or not.
I have considered checking the device type with sysctlbyname
with "hw.machine"
argument, and then use a mapping table to get the notch/no-notch result. But that has the disadvantage that the mapping table would need to be updated for each new iPhone model, and that it doesn't work on the simulator, which always returns the Mac machine name.
Any ideas how to solve that in a better way? I could simply avoid the recursive call, but will that solve the problem?
My code that determines the notch right now (Objective-C):
...ANSWER
Answered 2021-May-13 at 14:59I'm not familiar with Obj-c but that looks like a computed property/function. Every time you access it, it will get the current safe area inset and return a Bool.
But the problem is that you are then setting prefersStatusBarHidden
based on that Bool. If the status bar is hidden, the safe area will get smaller. Then, the next time you access the hasTopNotch
property, it will return an incorrect value.
Instead, what I do is check the safe area once and only once the app starts. Your user's device isn't ever going to change, so you don't need a function. In Swift:
QUESTION
I am new to PyQt5 and am having a hard time figuring out how will I convert the code accordingly so that it is frameless. I have used flags but it keeps giving me an error that the "UI_MainWindow object has no attribute 'SetWindowFlags'. The problem is in the execution part but I'm unable to figure out how to make the alterations.
...ANSWER
Answered 2021-May-02 at 18:20The problem comes from the fact that you're trying to edit a file that is not intended to be modified (exactly as the warning in the header says).
setWindowFlags
is a function of QWidget classes. The self
used there refers to the Ui_MainWindow
instance, which is a simple python object (the "Form class").
Theoretically, you can just use that function against the MainWindow
argument of setupUi
(which is a QWidget subclass, so it implements that function):
QUESTION
I'm trying to create a custom TitleBar. What I've done is create a frameless window, then use static control
for my custom TitleBar.
I've finished setting it up, the only missing function is the drag event.
...ANSWER
Answered 2021-Apr-02 at 11:06Wrong method The right method since Vista is now with DWM : https://docs.microsoft.com/en-us/windows/win32/dwm/customframe
QUESTION
So I am trying to create a window (QDialog) with a width of a 100% (of the screen) and a height of a fixed value, eg. 60px.
I tried to achieve this by setting the maximumSize's height property to 60px, leaving the width to whatever it was. (16777215) I also set the horizontal sizePolicy to Maximum, and the vertical to Fixed, with stretch values of 1 and 0 respectively.
As you can see in the picture above, the dialog appears centered, but not stretched at all horizontally.
The code is pretty simple as seen below, its just a frameless QDialog:
...ANSWER
Answered 2021-Mar-30 at 03:14maximumSize only indicates the maximum size it can take, it does not indicate that the widget will be stretched. In that case it is better to use a layout:
QUESTION
So i have this project with Frameless windows and in order to move them around the screen made such functions for every window:
window.h
...ANSWER
Answered 2021-Mar-29 at 17:28Maybe a stupid question, but have you enabled mouse tracking? eg. setMouseTracking(true);
in the window constructor.
Also, with your implementation, the window will move constantly even when you are not pressing the mouse. The way I would do it is to override two functions: onMousePressEvent()
and onMouseReleaseEvent()
, and create a variable isMousePressed
which will be checked in the mouseMoveEvent()
before moving the window.
QUESTION
Running into a really strange quirk and can't figure out what I'm doing wrong:
init.js
...ANSWER
Answered 2021-Mar-13 at 12:00Must call BrowserWindow.addBrowserView() BEFORE calling BrowserView.setBounds() -- (see Update #8)
QUESTION
For my frameless qml app i made close, minimise and maximize icons in ms paint (28×28 pixel art) and then added transparent background with photoshop.
I put them as icons on qml buttons. But they are looking blurry.
I tried disabling antialiasing, mipmaps, smoothing but still blurry.
Any help ? I want them to look pixely like minecraft text.
Edit : I appears that qml uses linear scaling for images. But for pixely look i need "nearest neighbour" scaling.
How can i use nearest neighbour in qml ?
...ANSWER
Answered 2021-Jan-31 at 16:48NVM Solved It !
It turns out that for nearest neighbour upscaling, you need to set smooth: false
(and for downscaling you need mipmaps as well) + remove sourceWidth
& sourceHeight
from your qml code. (Sometimes qt-creator turns it on by itself and this option is basically compresssing image resolution)
But in my case the Problem was that MS Paint in Windows 10 doesn't use solid colours. It uses solid colours in middle and increases transparency towards edges of strokes.
And that creates the blurry effect when viewed on small icon.
Simple Solution : Install Windows 7 and use its MS Paint. Or just use some other program.
QUESTION
I'm following this article to set up Electron and Svelte.
I wanted to make my window frameless so I enabled frame: false
in index.js
and it is successfully working and there is no title bar.
According to this StackOverflow answer, to enable moving, I need to use:
...ANSWER
Answered 2021-Jan-20 at 08:25It turns out I needed to add:
QUESTION
I have been trying to figure this out for the last two days. I want to make my window frameless, I saw in a couple of resources that I should be using Qt.FramelessWindowHint . However, it doesn't want to work and I can't figure out why.
Can someone please point out what's wrong with my code, as I am very new to PyQt5? (I have commented out sections that are related to some other files)
...ANSWER
Answered 2020-Nov-08 at 15:53You shouldn't try to edit or mimic the behavior of files generated by pyuic, as doing it leads to confusion about the object structure, and that's exactly your case.
Your Ui_MainWindow already inherits from QMainWindow, there's no use to create an instance of QMainWindow. In fact, what you're seeing is that QMainWindow, while you're setting the flag on the Ui_MainWindow instance, which you're never actually showing.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install Frameless
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page