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. Qt 6.0 adaptation: no member named 'midRef' in 'QString'. How to solve?

Qt 6.0 adaptation: no member named 'midRef' in 'QString'. How to solve?

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 2 Posters 4.4k 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.
  • B Offline
    B Offline
    bogong
    wrote on last edited by
    #1

    Hello all!
    I am trying to adopt the Qt 5.15 application for Qt 6.0 requirements and have this kind of error:

    1082:38: error: no member named 'midRef' in 'QString'
                    const int v = option.midRef(1).trimmed().toInt(&ok);
    

    How to solve it in Qt 6.0?

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

      @bogong said in Qt 6.0 adaptation: no member named 'midRef' in 'QString'. How to solve?:

      How to solve it in Qt 6.0?

      Use QStringView ctor.

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

      B 1 Reply Last reply
      2
      • Christian EhrlicherC Christian Ehrlicher

        @bogong said in Qt 6.0 adaptation: no member named 'midRef' in 'QString'. How to solve?:

        How to solve it in Qt 6.0?

        Use QStringView ctor.

        B Offline
        B Offline
        bogong
        wrote on last edited by bogong
        #3

        @Christian-Ehrlicher what is "ctor"? Class constructor?

        Christian EhrlicherC 1 Reply Last reply
        0
        • B bogong

          @Christian-Ehrlicher what is "ctor"? Class constructor?

          Christian EhrlicherC Offline
          Christian EhrlicherC Offline
          Christian Ehrlicher
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @bogong said in Qt 6.0 adaptation: no member named 'midRef' in 'QString'. How to solve?:

          what is "ctor"

          Constructor.

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

          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