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. How to redirect a qDebug in a widget
Forum Updated to NodeBB v4.3 + New Features

How to redirect a qDebug in a widget

Scheduled Pinned Locked Moved General and Desktop
4 Posts 3 Posters 2.9k 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.
  • V Offline
    V Offline
    valeria70
    wrote on last edited by
    #1

    Hi, I have a project developed in Windows using Eclipse IDE with the integration of QT library.
    I would to display my qDebug() messages not in a console but in a GUI (e.g with a QLabel).
    Is there a way to do this?
    Thanks.

    1 Reply Last reply
    0
    • C Offline
      C Offline
      clochydd
      wrote on last edited by
      #2

      Hi, what about using
      @
      QLabel.setText "My Message";
      @

      instead of
      @
      qDebug() <<"My Message";
      @

      1 Reply Last reply
      0
      • EddyE Offline
        EddyE Offline
        Eddy
        wrote on last edited by
        #3

        have a look at the "Debug output browser in the wiki":http://qt-project.org/wiki/Browser_for_QDebug_output

        hope it helps

        Qt Certified Specialist
        www.edalsolutions.be

        1 Reply Last reply
        0
        • EddyE Offline
          EddyE Offline
          Eddy
          wrote on last edited by
          #4

          for Qt5 you need qInstallMessageHandler instead of qInstallMsgHandler

          Qt Certified Specialist
          www.edalsolutions.be

          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