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. Extract part of "item" - wrong syntax
Forum Updated to NodeBB v4.3 + New Features

Extract part of "item" - wrong syntax

Scheduled Pinned Locked Moved Unsolved C++ Gurus
2 Posts 2 Posters 367 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
    Anonymous_Banned275
    wrote on 11 May 2021, 13:27 last edited by
    #1
    1. What "type" is "text" ? stream ?
    2. What is error "translation to English?
    3. What is wrong with my syntax to get "left" of the "text"?

    My code

    ui->textEdit_16->append(current->text());
    // extract address
    // remoteAddress(current->text().left(10));

    I need only the "address " part , not the name .

    bd87eec5-3700-4ab1-9efa-8660d3081099-image.png

    Error

    /home/qt/Qt/Examples/Qt-5.15.2/bluetooth/btscanner/device.cpp:2487: error: type 'QString' does not provide a call operator

    J 1 Reply Last reply 11 May 2021, 13:36
    0
    • A Anonymous_Banned275
      11 May 2021, 13:27
      1. What "type" is "text" ? stream ?
      2. What is error "translation to English?
      3. What is wrong with my syntax to get "left" of the "text"?

      My code

      ui->textEdit_16->append(current->text());
      // extract address
      // remoteAddress(current->text().left(10));

      I need only the "address " part , not the name .

      bd87eec5-3700-4ab1-9efa-8660d3081099-image.png

      Error

      /home/qt/Qt/Examples/Qt-5.15.2/bluetooth/btscanner/device.cpp:2487: error: type 'QString' does not provide a call operator

      J Offline
      J Offline
      J.Hilk
      Moderators
      wrote on 11 May 2021, 13:36 last edited by
      #2

      @AnneRanch wth is the return type of current()


      Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


      Q: What's that?
      A: It's blue light.
      Q: What does it do?
      A: It turns blue.

      1 Reply Last reply
      1

      1/2

      11 May 2021, 13:27

      • Login

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