V
V
Valery2016-12-06 23:37:31
Qt
Valery, 2016-12-06 23:37:31

Non-standard window in Qt 5 with support for snapping to screen edges?

Good day, the task arose to implement a stylized window on Qt 5 in such a way that there are no ordinary window frames, but snaps to the edges of the screen work, now it is in all OSes, move the program window all the way to the left and it occupies the left half of the screen and the same if you move the window to the right as far as it will go. Actually, there are many examples of how to make a non-standard window on Qt 5, but there is no work of snapping to the edges of the screen. Examples include Visual Studio 2015 or the latest version of Geforce Experience. If I understand correctly, then it is required to use the low-level functions of the OS itself to change the style, but I am not strong in these matters, in general I need your help, I don’t know where to start.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
P
Pavel, 2016-12-07
@electronik777

I don't quite understand what you need. Do you want to resize the window on startup? Then use inheritance from QWidget parameters x/y will indicate the coordinates of the beginning of the window, width/height the size of the window. If you want to completely change the interface, "ala" steam, origin, battle.net, then you need to write your widgets from scratch, of course using inheritance from the QWidget base classes.

J
Jacob E, 2016-12-07
@Zifix

Aero snap? Hands, all hands :/

V
Valery, 2016-12-07
@mvaleris

I managed to find a suitable example on Qt, it seems that I even study what I need, a link to the project example: https://github.com/deimos1877/BorderlessWindow
Here I found what I need for Windows and Mac https://github.com /dfct/TrueFramelessWindow , it
remains to find the same for Linux, but I think it will be more difficult with Linux, there are no standards and the implementation will depend on the graphical shell.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question