0

I have created a C++ Qt class, inheriting from QWidget. I have also created a QML file, which runs as my main, and I want in some point of the program to open another separated window containing this widget.

The point is to draw line graphs in QML, and I don't quite understand how to do it.

NG_
  • 6,895
  • 7
  • 45
  • 67
tzoorp
  • 183
  • 6
  • So are you trying to display a widget, or are you trying to draw line graphics? These are completely separate concepts, so you should probably edit the question to make it clearer... Is opening a separate window the key point here? – hyde May 18 '15 at 17:34

1 Answers1

0

First of all, take a look at this question and its answers: Qt5. Embed QWidget object in QML

You got into XY-problem. You do not need to embed QWidget to your QtQuick/QML application. (I hope) You can easily deal with your task using only QML. For example, there is Canvas Element that can help you to organize drawing. Take a look at tutorial related to Canvas in QmlBook.

Hope this helps!

Community
  • 1
  • 1
NG_
  • 6,895
  • 7
  • 45
  • 67