Skip to content
  • 0 Votes
    3 Posts
    555 Views
    F

    I selected MinGw as a compiler (and it works fine in 5.12 and 6.4 with Mingw.

  • 0 Votes
    5 Posts
    315 Views
    G

    Actually i did not at all, it's the first time i'm doing C# (i need to open a SQL Ce Database to make a custom tool for a software and i don't want to learn the MS UI stuff ^^)

    Thanks for the clarification !

  • 0 Votes
    1 Posts
    527 Views
    No one has replied
  • 0 Votes
    1 Posts
    532 Views
    No one has replied
  • 0 Votes
    3 Posts
    3k Views
    MhM93M

    @mrjj thank you for answer. I read that book but I did not get anything.
    I do like this site and make an example: http://nickguthrie.com/embedd_gui/src/qt-everywhere-opensource-src-4.8.4/doc/html/activeqt-server.html
    1- create widget application. (first made by console app but the Qt creator alert show it is not good in console app so I create widget app)

    2- in .pro :

    #------------------------------------------------- # # Project created by QtCreator 2016-08-20T12:52:04 # #------------------------------------------------- QT += core gui greaterThan(QT_MAJOR_VERSION, 4): QT += widgets TARGET = Test2ActiveXServer TEMPLATE = app SOURCES += main.cpp\ mainwindow.cpp \ test.cpp HEADERS += mainwindow.h \ test.h FORMS += mainwindow.ui #this is make QAXserver CONFIG += axserver RC_FILE = qaxserver.rc

    in main.cpp:

    #include "mainwindow.h" #include <QApplication> #include <QAxFactory> int main(int argc, char *argv[]) { QApplication a(argc, argv); if ( !QAxFactory::isServer() ) { MainWindow w; w.show(); } return a.exec(); }

    then create a class and its name is test.
    test.h:

    #ifndef TEST_H #define TEST_H #include <QObject> #include <QAxBindable> #include <QWidget> #include <QAxFactory> class test : public QObject , public QAxBindable { Q_OBJECT Q_PROPERTY( int value READ value WRITE setValue ) QAXFACTORY_BEGIN("{3304a730-4230-4a82-ab61-334a2e93c803}", "{23667206-d900-4f1a-a14f-30397fa5adc7}") QAXCLASS(MyWidget) QAXCLASS(MyWidget2) QAXTYPE(MySubType) QAXFACTORY_END() public: explicit test(QObject *parent = 0); int value() const; signals: void valueChange ( int a); public slots: void setValue (int a); private: int *val; }; #endif // TEST_H

    and test.cpp :

    #include "test.h" test::test(QObject *parent) : QObject(parent) { } int test::value() const { return val; } void test::setValue(int a) { val=a; emit valueChange(val); }

    after that I dont know what am I do?
    when run qmake just the qmake file create. when I build the project it shows me this error:

    :-1: error: dependent '..\Test2ActiveXServer\qaxserver.rc' does not exist.

    in that doc it says : "To build the ActiveX server executable run qmake to generate the makefile, and use your compiler's make tool as for any other Qt application. The make process will also register the controls in the system registry by calling the resulting executable with the -regserver command line option." . I don't understand it.
    My question is :
    Is that project is Active x server?
    How to test it?
    what am I do know?
    How does it work?

  • 0 Votes
    3 Posts
    6k Views
    koronaboraK

    All works well now.

    Thank you!

  • 0 Votes
    4 Posts
    2k Views
    MuratUrsavasM

    I'd like to include some final information to make this thread history.

    I had to use different classes (structs) for managed and native sides since they were not the same for the C++/CLI compiler. But I used a simple trick to define ingredients of these structs. This way I was able to sync the information between the managed and native world.

    Of course I had to use some wrapper code since the managed and native structs were living on different worlds.

  • 0 Votes
    10 Posts
    5k Views
    hskoglundH

    Indeed, debug build should work as well. Hmmm, try switching to Debug, and do Clean All, run Qmake, Rebuild All. Maybe do that twice for good measure.
    Anyway, now you're up and running in Release mode, happy VLC hacking!

  • 0 Votes
    1 Posts
    846 Views
    No one has replied
  • 0 Votes
    1 Posts
    626 Views
    No one has replied
  • 0 Votes
    1 Posts
    674 Views
    No one has replied