Results 1 to 2 of 2

Thread: How to embed a QAxWidget into QGraphicsProxyWidget?

  1. #1
    Join Date
    Aug 2013
    Posts
    1
    Qt products
    Qt5
    Platforms
    MacOS X Windows Android

    Default How to embed a QAxWidget into QGraphicsProxyWidget?

    Hi, all,

    I want to embed a QAxWidget into QGraphicsProxyWidget use the following code:

    Qt Code:
    1. QGraphicsScene *scene = new QGraphicsScene(0, 0, 800, 600);
    2. QGraphicsView *view = new QGraphicsView(scene);
    3. QAxWidget *widget = new QAxWidget();
    4. widget->setControl(QString::fromUtf8("{6BF52A52-394A-11d3-B153-00C04F79FAA6}")); //Windows Media Player CLSID or Other ActiveX CLSID
    5. QGraphicsProxyWidget *proxy = scene->addWidget(widget);
    6. proxy->setFlags(QGraphicsItem::ItemIsFocusable | QGraphicsItem::ItemIsSelectable);
    7. view->setScene(scene);
    8. view->show();
    To copy to clipboard, switch view to plain text mode 

    now, any operation on this widget is invalid.just like the widget is disabled. Any suggestions what I have to do?

    Best regards,

    Junan

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: How to embed a QAxWidget into QGraphicsProxyWidget?

    RTFM: From QGraphicsScene::addWidget:

    Note that widgets with the Qt::WA_PaintOnScreen widget attribute set and widgets that wrap an external application or controller are not supported. Examples are QGLWidget and QAxWidget.

Similar Threads

  1. QAxWidget
    By codeman in forum Qt Programming
    Replies: 2
    Last Post: 14th August 2012, 11:27
  2. QAxWidget and C#
    By vxmontes in forum Newbie
    Replies: 0
    Last Post: 3rd August 2011, 16:52
  3. QAxWidget
    By rajeshs in forum Qt Programming
    Replies: 1
    Last Post: 5th September 2008, 06:13
  4. QAxWidget
    By chak_med in forum Newbie
    Replies: 1
    Last Post: 10th September 2006, 21:05
  5. QAxWidget
    By ToddAtWSU in forum Newbie
    Replies: 2
    Last Post: 3rd February 2006, 18:29

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.