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. Qtserialbus can project example : what is the meaning of this line of code "QLoggingCategory::setFilterRules(QStringLiteral("qt.canbus* = true"));"
Forum Updated to NodeBB v4.3 + New Features

Qtserialbus can project example : what is the meaning of this line of code "QLoggingCategory::setFilterRules(QStringLiteral("qt.canbus* = true"));"

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 3 Posters 272 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.
  • I Offline
    I Offline
    imene
    wrote on last edited by aha_1980
    #1

    Hello
    what is the meening of this line of code "QLoggingCategory::setFilterRules(QStringLiteral("qt.canbus* = true"));"
    in main.cpp of qtserialbus can project example (https://code.qt.io/cgit/qt/qtserialbus.git/tree/examples/serialbus/can?h=5.15.2)
    fe53d108-9973-4402-a00c-57aeff76bca3-image.png

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      "enable the logging of messages concerning all the categories under qt.canbus".

      See QLoggingCategory::setFilterRules.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      2
      • I Offline
        I Offline
        imene
        wrote on last edited by imene
        #3

        Thanks @SGaist ;
        And "this" refers to what in this line of code :
        connect(m_ui->sendFrameBox, &SendFrameBox::sendFrame, this, &MainWindow::sendFrame);
        504648e8-4eb3-4b19-adf4-fe6b71b6f848-image.png

        mrjjM 1 Reply Last reply
        0
        • I imene

          Thanks @SGaist ;
          And "this" refers to what in this line of code :
          connect(m_ui->sendFrameBox, &SendFrameBox::sendFrame, this, &MainWindow::sendFrame);
          504648e8-4eb3-4b19-adf4-fe6b71b6f848-image.png

          mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by mrjj
          #4

          @imene
          Hi
          the this in the connect is the Mainwindow which has the sendFrame method.

          So it says
          connect sendFrameBox's signal sendFrame to MainWindows's slot called sendFrame

          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