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 access chartview in chat
Forum Updated to NodeBB v4.3 + New Features

How to access chartview in chat

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

    It is possible to access the chart from the chatview, but is there a way to access the chartview from the chart?

    JonBJ 1 Reply Last reply
    0
    • I IknowQT

      It is possible to access the chart from the chatview, but is there a way to access the chartview from the chart?

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

      @IknowQT
      Like QGraphicsScene/QGraphicsView, and other Qt model-views like QAbstractTableModel/QTableView, the view is attached to, and can see, the backing model/scene/chart, but that does not have access to any view(s) (might be multiple) which might be attached to it.

      The first question to ask yourself is: why does the chart need any access to a view? It is not supposed to, and may indicate a bad approach.

      If you do want that for whatever reason, subclass the QChart and add a member variable which you set to the single QChartView you want it to be able to access.

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

        @JonB said in How to access chartview in chat:

        스스로에게 묻는 첫 번째 질문은 다음과 같습니다. 차트에 보기에 대한 액세스 권한이 필요한 이유는 무엇입니까? 그

        I wanted to get the geometry value of the chart view, so I made a set function manually to get the value.
        A sudden thought occurred to me that the parent could be called from the chart because there is a chart under the chart view.

        JonBJ 1 Reply Last reply
        0
        • I IknowQT

          @JonB said in How to access chartview in chat:

          스스로에게 묻는 첫 번째 질문은 다음과 같습니다. 차트에 보기에 대한 액세스 권한이 필요한 이유는 무엇입니까? 그

          I wanted to get the geometry value of the chart view, so I made a set function manually to get the value.
          A sudden thought occurred to me that the parent could be called from the chart because there is a chart under the chart view.

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

          @IknowQT said in How to access chartview in chat:

          I wanted to get the geometry value of the chart view, so I made a set function manually to get the value.

          Why would your QChart code want to know or care about what the geometry of some particular QChartView is? It should not.

          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