Results 1 to 4 of 4

Thread: C++/Qt Developer, Multithreading, IPC and Vega Prime developer

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #4
    Join Date
    Jun 2012
    Posts
    0
    Platforms
    Windows

    Default Re: C++/Qt Developer, Multithreading, IPC and Vega Prime developer

    yes,wthread is a workthread,vpwin is a member of it!
    #ifndef QWORKTHREAD_H
    #define QWORKTHREAD_H

    #include <QThread>
    #include <vpWindow.h>

    class QWorkThread : public QThread
    {
    Q_OBJECT

    public:
    QWorkThread(QObject *parent);
    ~QWorkThread();

    private:
    void run();
    public:
    vpWindow *vpwin;

    };

    #endif // QWORKTHREAD_H

    #include "qworkthread.h"
    #include <vp.h>
    #include <vpApp.h>
    #include <vpKernel.h>
    #include <vuAllocTracer.h>
    #include <Qt/qwidget.h>
    vuAllocTracer m_allocTracer;

    QWorkThread::QWorkThread(QObject *parent)
    : QThread(parent)
    {

    }

    QWorkThread::~QWorkThread()
    {

    }
    void QWorkThread::run()
    {

    //initial
    vp::initialize(__argc, __argv);
    //load acf
    vpKernel::instance()->define("simple.acf");
    //configure VP
    vpKernel::instance()->configure();
    //for begin
    // vpwin=*vpWindow::begin();
    // vpwin->setBorderEnable(false);
    //vpwin->setFullScreenEnable(true);
    // vpwin->setParent(wid);
    while(vpKernel::instance()->beginFrame()!=0)
    {
    vpKernel::instance()->endFrame();
    }
    //exit
    vpKernel::instance()->unconfigure();
    vp::shutdown();


    }


    Added after 5 minutes:


    In fact,I don't know how to combin QT and VP progaram.
    I think when I get the WId of anyone widget,then set vp window as its parent is ok!
    but as you know.......hehe!
    say something to the problem,please. A simple example is looked forward.
    Last edited by simeitech; 27th June 2012 at 06:35.

Similar Threads

  1. Good Developer vs Bad Developer
    By wysota in forum General Discussion
    Replies: 30
    Last Post: 13th December 2010, 16:16
  2. Looking for a QT developer
    By ocular in forum Jobs
    Replies: 3
    Last Post: 1st May 2010, 16:11
  3. Replies: 2
    Last Post: 1st May 2010, 16:05

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.