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. When using qt c++ Qchart Linechart, I want to receive data when a button event is activated and display a graph.
QtWS25 Last Chance

When using qt c++ Qchart Linechart, I want to receive data when a button event is activated and display a graph.

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 2 Posters 503 Views
  • 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.
  • T Offline
    T Offline
    tommy_taiwan
    wrote on last edited by tommy_taiwan
    #1

    Hello.
    I am a beginner using Qt c++.

    Now, use Linechart among Qcharts through Qt official website, YouTube, and Google.
    I am trying to draw a graph on the main screen.

    What I want is to draw a graph in QWidget or QLayout on a specific part of the main screen when a button is pressed. The almost examples draw graphs only in the Mainwindow constructor.

    Can I know how to draw a graph on a specific part of the main screen by receiving the event when the button is pressed? No matter how much I think about it, I can't find an answer... 설명.PNG

    jsulmJ 1 Reply Last reply
    0
    • T tommy_taiwan

      Hello.
      I am a beginner using Qt c++.

      Now, use Linechart among Qcharts through Qt official website, YouTube, and Google.
      I am trying to draw a graph on the main screen.

      What I want is to draw a graph in QWidget or QLayout on a specific part of the main screen when a button is pressed. The almost examples draw graphs only in the Mainwindow constructor.

      Can I know how to draw a graph on a specific part of the main screen by receiving the event when the button is pressed? No matter how much I think about it, I can't find an answer... 설명.PNG

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @tommy_taiwan Please start here https://doc.qt.io/qt-5/signalsandslots.html and here https://doc.qt.io/qt-5/layout.html

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      T 2 Replies Last reply
      0
      • jsulmJ jsulm

        @tommy_taiwan Please start here https://doc.qt.io/qt-5/signalsandslots.html and here https://doc.qt.io/qt-5/layout.html

        T Offline
        T Offline
        tommy_taiwan
        wrote on last edited by
        #3

        @jsulm thank you for your reply. I will start that

        1 Reply Last reply
        0
        • jsulmJ jsulm

          @tommy_taiwan Please start here https://doc.qt.io/qt-5/signalsandslots.html and here https://doc.qt.io/qt-5/layout.html

          T Offline
          T Offline
          tommy_taiwan
          wrote on last edited by
          #4

          @jsulm I am doing see the web-site, can you give to me relative source code?

          jsulmJ 1 Reply Last reply
          0
          • T tommy_taiwan

            @jsulm I am doing see the web-site, can you give to me relative source code?

            jsulmJ Offline
            jsulmJ Offline
            jsulm
            Lifetime Qt Champion
            wrote on last edited by
            #5

            @tommy_taiwan What source code? I'm not going to write all this for you. You should learn things.
            What exactly is the problem?
            Do you know how to connect a slot to a signal? First step is: add a QPushButton to your ui, connect its clicked() signal to a slot where you will trigger chart...

            https://forum.qt.io/topic/113070/qt-code-of-conduct

            T 1 Reply Last reply
            0
            • jsulmJ jsulm

              @tommy_taiwan What source code? I'm not going to write all this for you. You should learn things.
              What exactly is the problem?
              Do you know how to connect a slot to a signal? First step is: add a QPushButton to your ui, connect its clicked() signal to a slot where you will trigger chart...

              T Offline
              T Offline
              tommy_taiwan
              wrote on last edited by
              #6

              @jsulm ok, sorry for trouble to you. I will learn more and try that.

              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