Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. [solved]display qt quick control calendar at a certain position
Forum Updated to NodeBB v4.3 + New Features

[solved]display qt quick control calendar at a certain position

Scheduled Pinned Locked Moved QML and Qt Quick
4 Posts 2 Posters 1.2k 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.
  • A Offline
    A Offline
    andruj
    wrote on last edited by
    #1

    Greetings.

    I am developing an application in qt quick, using the qt quick "controls":http://qt-project.org/doc/qt-5/qtquickcontrols-index.html, I have a set up with a "GridLayout":http://qt-project.org/doc/qt-5/qml-qtquick-layouts-gridlayout.html in which I use a "RowLayout":http://qt-project.org/doc/qt-5/qml-qtquick-layouts-rowlayout.html, in "RowLayout":http://qt-project.org/doc/qt-5/qml-qtquick-layouts-rowlayout.html I have an some "TextField":http://qt-project.org/doc/qt-5/qml-qtquick-controls-textfield.html controls. I am using anchors based design,

    The problem is that I would like to display the calendar control below one of the "TextFields":http://qt-project.org/doc/qt-5/qml-qtquick-controls-textfield.html. but aver the "GridLayout":http://qt-project.org/doc/qt-5/qml-qtquick-layouts-gridlayout.html.

    It turned out that the calendar control cannot be in the grid layout, because it will break the existing item order, so I have to remove it out, to the main element, because of this the anchors binding is not possible anymore, and if I try to access the properties of the "TextField":http://qt-project.org/doc/qt-5/qml-qtquick-controls-textfield.html it has the position properties X, Y empty.

    The question is: is it possible to determine the exact position of the "TextField":http://qt-project.org/doc/qt-5/qml-qtquick-controls-textfield.html in the "RowLayout":http://qt-project.org/doc/qt-5/qml-qtquick-layouts-rowlayout.html? and if it is How?

    Sorry for a rather long, and hopefully not too confusing explanation.
    Thank you for your answer.

    Ciao, Andrej

    1 Reply Last reply
    0
    • p3c0P Offline
      p3c0P Offline
      p3c0
      Moderators
      wrote on last edited by
      #2

      Hi,

      bq. is it possible to determine the exact position of the TextField [qt-project.org] in the RowLayout [qt-project.org]? and if it is How?

      AFAIK, you can use mapToItem function to get global coordinates of the element.

      157

      1 Reply Last reply
      0
      • A Offline
        A Offline
        andruj
        wrote on last edited by
        #3

        Hi,

        thank you for the replay, This function did the trick.

        Bye Andrej

        1 Reply Last reply
        0
        • p3c0P Offline
          p3c0P Offline
          p3c0
          Moderators
          wrote on last edited by
          #4

          You're Welcome :) You can mark the post as solved by editing and prepending the thread title with [Solved]

          157

          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