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. Viewport of QChartView contained within QDockWidget

Viewport of QChartView contained within QDockWidget

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 818 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.
  • V Offline
    V Offline
    vorlket
    wrote on last edited by vorlket
    #1

    Isn't dockWidgetContents of QDockWidget viewport of QChartView when the chartview is contained within the dock widget?

    setting the dock widget contents as viewport of the chartview by the following code doesn't start the application, although the application output says 'Starting ...' without any error.

    ui->chartview->setViewport(ui->dockWidgetContents);
    
    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi
      Normally one would add the chartview to the dock using
      http://doc.qt.io/qt-5/qdockwidget.html#setWidget

      Did you check if ui->dockWidgetContents is Not null?

      1 Reply Last reply
      1
      • V Offline
        V Offline
        vorlket
        wrote on last edited by vorlket
        #3

        No, it's not null. I was trying it while looking for a solution to another post of mine (https://forum.qt.io/topic/72548/setting-size-of-qboxplot-horizontal-axis-slot). I am guessing that the method doesn't work as "QChartView is a standalone widget" (http://doc.qt.io/qt-5/qchartview.html#details). I am looking at Graphics View Framework for a solution (https://forum.qt.io/topic/72869/adding-and-drawing-qchart-to-qgraphicsscene).

        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