[solved] How to set x ad y position through property window.
-
Hi,
How to set x ad y position through property window.I can see "Geometry->x, Geometry -> Y" options but those default zero. not allowing to change.
Please tell me how to change x, y values in property window.
Thank you
-
X and Y are usually managed automatically by the layouts, you do not normally need to change them. And if you want to, you need to remove the widgets from the layout.
Unless you are talking about QML, where in order to modify X and Y you need not to use Anchors or Layouts.
-
Hi,
thanks for reply.I have a requirements like this,
- Window should not movable.It should display with fixed height and width at fixed x and y positions.
- I dint want any close or minimize buttons on window.
How to achieve the same.
please help me. -
Ah, if we are talking about top-level window (widget), then the internal UI can remain locked in layouts, as they are much easier to handle.
Well, you can specify the max and min size, then use move() or setGeometry() methods on the top-level widget, but judging from your description I guess you will be much more interested in simply setting your window type to SplashScreen or Popup. You can do this using setWindowFlags() method.
-
Hi.
[quote author="mvenkat061" date="1412759807"]Hi,
thanks for reply.I have a requirements like this,
- Window should not movable.It should display with fixed height and width at fixed x and y positions.
- I dint want any close or minimize buttons on window.
How to achieve the same.
please help me.[/quote]
@
setGeometry(100,100,200,100);
setWindowFlags(Qt::FramelessWindowHint);
@
hope it helps. -
Thank you..
Its working. but is their any way to avoid coding.
i,e can we do some setting for achieve the same. -
Hi.
[quote author="mvenkat061" date="1413263263"]Thank you..
Its working. but is their any way to avoid coding.
i,e can we do some setting for achieve the same.
[/quote]You have to write that given code.
You can not have all properties at design time(Qt Designer).
hope this helps. -
Also Make this thread as [SOLVED] so other members can notify that problem is solved.