Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Solved unresolved overloaded function type error

    General and Desktop
    2
    3
    1473
    Loading More Posts
    • 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.
    • Z
      zeroptr last edited by

      Hi All,

      I have this error after I wrote the code

      frmmain.cpp:78: error: no match for 'operator==' (operand types are '<unresolved overloaded function type>' and 'QString')
      if (window->windowTitle == Form_Header)
      ^
      code

      QMdiSubWindow *frmMAIN::findMdiChild(QString Form_Header)
      {
          foreach (QMdiSubWindow *window, ui->mdiArea->subWindowList())
          {
              if (window->windowTitle == Form_Header)
                  return window;
          }
          return 0;
      }
      
      How to cast I don't have a clue?
      
      Thanks
      
      
      

      Linux Mint 20.04 64 Bit QT6.0.1

      1 Reply Last reply Reply Quote 0
      • M
        mcosta last edited by

        Hi,

        you have missing parenthesis in

        if (window->windowTitle == Form_Header)
        

        should be

        if (window->windowTitle() == Form_Header)
        

        Once your problem is solved don't forget to:

        • Mark the thread as SOLVED using the Topic Tool menu
        • Vote up the answer(s) that helped you to solve the issue

        You can embed images using (http://imgur.com/) or (http://postimage.org/)

        1 Reply Last reply Reply Quote 0
        • Z
          zeroptr last edited by

          Thanks man...

          Can't believe myself!!

          Linux Mint 20.04 64 Bit QT6.0.1

          1 Reply Last reply Reply Quote 0
          • First post
            Last post