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. TextBox in Output pane of Qt creator
Forum Updated to NodeBB v4.3 + New Features

TextBox in Output pane of Qt creator

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

    I have a plugin which prints the output data read from a perl script in the General messages output pane. I want to make each statement from the output data clickable to parse the clicked output and open the file if valid.

    To achieve this, I am trying to redirect each line to a textview/QLabel in Qt , to handle click events of it. Is it possible to create a label in output pane to display the texts in it from the plugin ?

    JonBJ 1 Reply Last reply
    0
    • V Veepee

      I have a plugin which prints the output data read from a perl script in the General messages output pane. I want to make each statement from the output data clickable to parse the clicked output and open the file if valid.

      To achieve this, I am trying to redirect each line to a textview/QLabel in Qt , to handle click events of it. Is it possible to create a label in output pane to display the texts in it from the plugin ?

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by
      #2

      @Veepee
      I am a not a Qt expert. I don't know whether it's possible to do this in Qt Creator's Output window. But what sort of order of number of lines are you expecting? Because 1,000 lines => 1,000 separate QLabel widgets sounds non-scalable to me...

      V 1 Reply Last reply
      0
      • JonBJ JonB

        @Veepee
        I am a not a Qt expert. I don't know whether it's possible to do this in Qt Creator's Output window. But what sort of order of number of lines are you expecting? Because 1,000 lines => 1,000 separate QLabel widgets sounds non-scalable to me...

        V Offline
        V Offline
        Veepee
        wrote on last edited by
        #3

        @JonB Yes, true. Definitely this doesnt look to be a good option to me either :| , but couldn't identify any other feasible solution yet.

        1 Reply Last reply
        0
        • mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Hi
          You mean something like what Todo plugin does ?
          http://katecpp.github.io/qtcreator-todo/

          V 1 Reply Last reply
          1
          • mrjjM mrjj

            Hi
            You mean something like what Todo plugin does ?
            http://katecpp.github.io/qtcreator-todo/

            V Offline
            V Offline
            Veepee
            wrote on last edited by
            #5

            @mrjj Exactly. Thanks a lot for this.
            But this looks to identify the comments section from current document. The difference is I want to filter the warning/error output from General messages pane .

            mrjjM 1 Reply Last reply
            0
            • V Veepee

              @mrjj Exactly. Thanks a lot for this.
              But this looks to identify the comments section from current document. The difference is I want to filter the warning/error output from General messages pane .

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

              @Veepee

              well i was thinking you altered the the todo sample and simple output
              to that pane instead (from perl plugin) ?

              V 1 Reply Last reply
              0
              • aha_1980A Offline
                aha_1980A Offline
                aha_1980
                Lifetime Qt Champion
                wrote on last edited by
                #7

                @Veepee

                What happened to your other thread? https://forum.qt.io/topic/86282/get-click-events-from-output-pane-of-qt-creator/5

                As said there, the General Messages pane is currently missing that function, but it is there in Compile output e.g.

                Qt has to stay free or it will die.

                1 Reply Last reply
                0
                • V Offline
                  V Offline
                  Veepee
                  wrote on last edited by
                  #8

                  @aha_1980 I am open to redirect my output to Compile output window as well if this supports the link functionality.. But I see Core::MessageManager::write only redirects to General messages output pane. Do we have any similar interface to write to Compile output window ?

                  1 Reply Last reply
                  0
                  • mrjjM mrjj

                    @Veepee

                    well i was thinking you altered the the todo sample and simple output
                    to that pane instead (from perl plugin) ?

                    V Offline
                    V Offline
                    Veepee
                    wrote on last edited by
                    #9

                    @mrjj No, I have not altered any. Its a plugin that reads the data from perl and dumps to output pane using MessageManager::write

                    mrjjM 1 Reply Last reply
                    0
                    • V Veepee

                      @mrjj No, I have not altered any. Its a plugin that reads the data from perl and dumps to output pane using MessageManager::write

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

                      @Veepee

                      ok. but if you already have a Creator plugin why not make your own pane ( like todo)
                      and just output there ?

                      V 1 Reply Last reply
                      0
                      • mrjjM mrjj

                        @Veepee

                        ok. but if you already have a Creator plugin why not make your own pane ( like todo)
                        and just output there ?

                        V Offline
                        V Offline
                        Veepee
                        wrote on last edited by
                        #11

                        @mrjj That would be great. But is it that simple ? Do we have any direct interfaces available for this ? Currently am referring ToDo plugin to understand how this is done.

                        mrjjM 1 Reply Last reply
                        0
                        • V Veepee

                          @mrjj That would be great. But is it that simple ? Do we have any direct interfaces available for this ? Currently am referring ToDo plugin to understand how this is done.

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

                          @Veepee

                          Hi, to be frank, i would just reuse the toDo pane as
                          its all the same and only difference is what widgets are used.
                          As i remember it, it was not terrible complex when you had sample to reuse. :)

                          1 Reply Last reply
                          1

                          • Login

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