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. QLineEdit, adjust Widget position in MainWindow (not cursor)
Forum Updated to NodeBB v4.3 + New Features

QLineEdit, adjust Widget position in MainWindow (not cursor)

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 2 Posters 845 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.
  • yczoY Offline
    yczoY Offline
    yczo
    wrote on last edited by
    #1

    Hello folks, I have some QlineEdit in mainWindow....

    QLineEdit *ql[10];
    for (int i=0; i < 10; i++) {
    ql[i]= new QLineEdit(this);
    }

    Someone so kind to explain me how can I adjust the position and size of each inside the for?
    I miss some like ql[i]->setPosition(x,y)

    thanks in advance.

    1 Reply Last reply
    0
    • yczoY Offline
      yczoY Offline
      yczo
      wrote on last edited by yczo
      #2

      the solution is

      ql[i]->move(x,y);

      Sorry I could not find at first by asking wrong to google

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi,

        Out of curiosity, why not use one of Qt's layout for that (e.g. QGridLayout) ?

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0
        • yczoY Offline
          yczoY Offline
          yczo
          wrote on last edited by yczo
          #4

          Because I have not Idea XDD, first new!, thank you

          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