Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. [solved] How to set x ad y position through property window.
Forum Updated to NodeBB v4.3 + New Features

[solved] How to set x ad y position through property window.

Scheduled Pinned Locked Moved Qt Creator and other tools
8 Posts 3 Posters 2.6k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mvenkat061
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      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.

      (Z(:^

      1 Reply Last reply
      0
      • M Offline
        M Offline
        mvenkat061
        wrote on last edited by
        #3

        Hi,
        thanks for reply.

        I have a requirements like this,

        1. Window should not movable.It should display with fixed height and width at fixed x and y positions.
        2. I dint want any close or minimize buttons on window.

        How to achieve the same.
        please help me.

        1 Reply Last reply
        0
        • sierdzioS Offline
          sierdzioS Offline
          sierdzio
          Moderators
          wrote on last edited by
          #4

          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.

          (Z(:^

          1 Reply Last reply
          0
          • IamSumitI Offline
            IamSumitI Offline
            IamSumit
            wrote on last edited by
            #5

            Hi.
            [quote author="mvenkat061" date="1412759807"]Hi,
            thanks for reply.

            I have a requirements like this,

            1. Window should not movable.It should display with fixed height and width at fixed x and y positions.
            2. 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.

            Be Cute

            1 Reply Last reply
            0
            • M Offline
              M Offline
              mvenkat061
              wrote on last edited by
              #6

              Thank you..
              Its working. but is their any way to avoid coding.
              i,e can we do some setting for achieve the same.

              1 Reply Last reply
              0
              • IamSumitI Offline
                IamSumitI Offline
                IamSumit
                wrote on last edited by
                #7

                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.

                Be Cute

                1 Reply Last reply
                0
                • IamSumitI Offline
                  IamSumitI Offline
                  IamSumit
                  wrote on last edited by
                  #8

                  Also Make this thread as [SOLVED] so other members can notify that problem is solved.

                  Be Cute

                  1 Reply Last reply
                  0

                  • Login

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • Users
                  • Groups
                  • Search
                  • Get Qt Extensions
                  • Unsolved