Does Wincc OA support QtQuick controls?

Discussion about recent product features & solutions!
8 posts • Page 1 of 1
jiaofueric
Posts:18
Joined: Wed Oct 31, 2018 7:40 am

Does Wincc OA support QtQuick controls?

Post by jiaofueric »

Please see the title :dry:
It troubled me very much.

mkoller
Posts:741
Joined: Fri Sep 17, 2010 9:03 am

Re: Does Wincc OA support QtQuick controls?

Post by mkoller »

We don't support it directly. What you can do is to implement an ewo which creates a QQuickWidget, which can then load a qml file.
However we do not deliver all the qml components/libraries from Qt which will be needed when you want to use QtQuick controls, so
you would have to deliver them on your own.

jiaofueric
Posts:18
Joined: Wed Oct 31, 2018 7:40 am

Re: Does Wincc OA support QtQuick controls?

Post by jiaofueric »

Thanks a lot , Sir


I tried it according your method But it still doesn't work

Attach my code...

Code: Select all

//.h 

#include 
#include 

class MyWidget : public QWidget
{
  Q_OBJECT

  public:
    MyWidget(QWidget *parent);

  signals:

  protected:

  private:
    QQuickWidget *myQmlWidget;

};
//.cpp
EWO_PLUGIN( myQml )

MyWidget::MyWidget(QWidget *parent)
  : QWidget(parent)
{
    this->myQmlWidget = new QQuickWidget();
    QUrl url("qrc:/firstQml.qml");
//    myQmlWidget->setResizeMode(QQuickWidget::SizeRootObjectToView);
    myQmlWidget->setSource(url);
    QVBoxLayout *myLayout = new QVBoxLayout(this);
    myLayout->addWidget(myQmlWidget);
    this->setLayout(myLayout);

}

thank you for your help

BR

Eric

mkoller
Posts:741
Joined: Fri Sep 17, 2010 9:03 am

Re: Does Wincc OA support QtQuick controls?

Post by mkoller »

I once implemented such an ewo as a prototype. Find it attached here.
This code can also use datapoint values to act on properties. https://www.winccoa.com/fileadmin/image ... /Quick.zip
Attachments
Quick.zip
(5.69 KiB) Downloaded 303 times

jiaofueric
Posts:18
Joined: Wed Oct 31, 2018 7:40 am

Re: Does Wincc OA support QtQuick controls?

Post by jiaofueric »

Thank you very much ,Sir

But I can't download it now

The server return information as below:

Not Found
The requested URL /images/fbfiles/files/Quick.zip was not found on this server.

Please see the attached....

Could you send it wo my email?

my email is : jch@lailibai.com

BR
Eric Image

mkoller
Posts:741
Joined: Fri Sep 17, 2010 9:03 am

Re: Does Wincc OA support QtQuick controls?

Post by mkoller »

I have uploaded it again.

jiaofueric
Posts:18
Joined: Wed Oct 31, 2018 7:40 am

Re: Does Wincc OA support QtQuick controls?

Post by jiaofueric »

It Works

Thank you Sir

jiaofueric
Posts:18
Joined: Wed Oct 31, 2018 7:40 am

Re: Does Wincc OA support QtQuick controls?

Post by jiaofueric »

Copy that
Thanks a lot
:cheer: :cheer: :cheer: :cheer: :cheer:

8 posts • Page 1 of 1