Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Special Interest Groups
  3. C++ Gurus
  4. QT connect versus socket connect...
Forum Updated to NodeBB v4.3 + New Features

QT connect versus socket connect...

Scheduled Pinned Locked Moved Unsolved C++ Gurus
3 Posts 3 Posters 553 Views 2 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
    Anonymous_Banned275
    wrote on last edited by
    #1

    QT connect versus socket connect

    I am using ancient Bluetooth C code example and painted myself into a corner...

    How do I instruct the compiler to use "socket connect" AND not "QT connect " ?

    status = connect(s, (struct sockaddr *)&addr, sizeof(addr));

    1 Reply Last reply
    0
    • Chris KawaC Online
      Chris KawaC Online
      Chris Kawa
      Lifetime Qt Champion
      wrote on last edited by
      #2

      It's a function in global scope, so you can explicitly state that scope to differentiate from the QObject member function:

      status = ::connect(s, (struct sockaddr *)&addr, sizeof(addr));
      
      1 Reply Last reply
      3
      • Christian EhrlicherC Offline
        Christian EhrlicherC Offline
        Christian Ehrlicher
        Lifetime Qt Champion
        wrote on last edited by Christian Ehrlicher
        #3

        ... and the groundhog says hello every day year: https://forum.qt.io/topic/121943/whoops-complier-see-qt-connect-is-a-dupe

        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
        2

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved