Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to move a QPushButton inside gridLayout?
Forum Updated to NodeBB v4.3 + New Features

How to move a QPushButton inside gridLayout?

Scheduled Pinned Locked Moved Unsolved General and Desktop
qpushbuttonqgridlayout
3 Posts 2 Posters 2.3k 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.
  • N Offline
    N Offline
    NIXIN
    wrote on 24 Jun 2016, 05:49 last edited by
    #1

    I have just tried a simple thing, in designer I created one push button, inside grid layout. The problem is geometry option got disabled in Property box, and I am not able to change the cordinates. In this situation how should I move the push button from its original place if required?

    Can somebody help me to achieve this??

    M 1 Reply Last reply 24 Jun 2016, 06:49
    0
    • N NIXIN
      24 Jun 2016, 05:49

      I have just tried a simple thing, in designer I created one push button, inside grid layout. The problem is geometry option got disabled in Property box, and I am not able to change the cordinates. In this situation how should I move the push button from its original place if required?

      Can somebody help me to achieve this??

      M Offline
      M Offline
      mrjj
      Lifetime Qt Champion
      wrote on 24 Jun 2016, 06:49 last edited by
      #2

      @NIXIN
      Hi
      Since a layout arrange its members , you are not allowed to use the geometry to just freely set it.

      You can however move it around in the grid by dragging.

      Or if you insert from code

      MyGridLayout->addWidget(new QPushButton("Button"), ROW, COL);

      N 1 Reply Last reply 24 Jun 2016, 10:24
      2
      • M mrjj
        24 Jun 2016, 06:49

        @NIXIN
        Hi
        Since a layout arrange its members , you are not allowed to use the geometry to just freely set it.

        You can however move it around in the grid by dragging.

        Or if you insert from code

        MyGridLayout->addWidget(new QPushButton("Button"), ROW, COL);

        N Offline
        N Offline
        NIXIN
        wrote on 24 Jun 2016, 10:24 last edited by
        #3

        @mrjj I tried it but it didn't worked, however I found the solution for it.
        Break the Layout, arrange the widgets and then set the layout

        1 Reply Last reply
        1

        3/3

        24 Jun 2016, 10:24

        • Login

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