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 read MySQL Polygon value with Qt?
Forum Updated to NodeBB v4.3 + New Features

How to read MySQL Polygon value with Qt?

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 2 Posters 333 Views
  • 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.
  • KroMignonK Offline
    KroMignonK Offline
    KroMignon
    wrote on last edited by
    #1

    Hi all,

    I have to read POLYGON entries from a mySQL DB.
    But POLYGON (as JSON) are not supported by Qt SQL plugin, AFAIK.
    What is the best way to achieve this?

    Is there someone how has experience with this.
    Thanks for any advice.

    It is an old maxim of mine that when you have excluded the impossible, whatever remains, however improbable, must be the truth. (Sherlock Holmes)

    1 Reply Last reply
    0
    • Christian EhrlicherC Online
      Christian EhrlicherC Online
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by Christian Ehrlicher
      #2

      The POLYGON field is of type FIELD_TYPE_GEOMETRY when I'm correct (QTBUG-72140). So you should be able to retrieve it as QByteArray (when flagged as binary) or QString (otherwise) since Qt5.15.0. See https://codereview.qt-project.org/c/qt/qtbase/+/277276

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      KroMignonK 1 Reply Last reply
      4
      • Christian EhrlicherC Christian Ehrlicher

        The POLYGON field is of type FIELD_TYPE_GEOMETRY when I'm correct (QTBUG-72140). So you should be able to retrieve it as QByteArray (when flagged as binary) or QString (otherwise) since Qt5.15.0. See https://codereview.qt-project.org/c/qt/qtbase/+/277276

        KroMignonK Offline
        KroMignonK Offline
        KroMignon
        wrote on last edited by
        #3

        @Christian-Ehrlicher Too bad for me, I have to deal with an old Qt version (5.5).

        Updating Qt version is not really an option, there are too many other softwares which are impacted.

        Anyway, thanks for the links.

        It is an old maxim of mine that when you have excluded the impossible, whatever remains, however improbable, must be the truth. (Sherlock Holmes)

        1 Reply Last reply
        0
        • Christian EhrlicherC Online
          Christian EhrlicherC Online
          Christian Ehrlicher
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Since the patch is trivial you can maybe add it to your Qt version?

          Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
          Visit the Qt Academy at https://academy.qt.io/catalog

          KroMignonK 1 Reply Last reply
          1
          • Christian EhrlicherC Christian Ehrlicher

            Since the patch is trivial you can maybe add it to your Qt version?

            KroMignonK Offline
            KroMignonK Offline
            KroMignon
            wrote on last edited by
            #5

            @Christian-Ehrlicher said in How to read MySQL Polygon value with Qt?:

            Since the patch is trivial you can maybe add it to your Qt version?

            I will take a closer look at this, maybe it is the best way to go.

            It is an old maxim of mine that when you have excluded the impossible, whatever remains, however improbable, must be the truth. (Sherlock Holmes)

            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