Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6380159
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T02:13:54+00:00 2026-05-25T02:13:54+00:00

I know this question may seem odd due to new existing alternatives, but trust

  • 0

I know this question may seem odd due to new existing alternatives, but trust me there’s a reason.

I would like to use the mscomm active X control to communicate through serial port with Qt.
Yes, I know there’s QextSerialPort, QSerialDevice and a lot of examples about how to write serial communication code. But due a problems I have I would like to test mscomm.

I know Qt has a system to use ActiveX controls, but I cannot find any clear information about how to use them (I don’t understand the qt official doc about this).

Visual C++ 6 has a mscomm.h and mscomm.cpp which I think implements the active x interface, but is plenty of microsoft mfc macros and dependencies everywhere.

Any clue?

  • 1 1 Answer
  • 2 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T02:13:55+00:00Added an answer on May 25, 2026 at 2:13 am

    Ok, seems I achieved it.

    You must use QAxObject to wrap the activeX you want to execute. To do so you need to know the CLSID, in my case :

      QAxObject* activex = new QAxObject("648A5600-2C6E-101B-82B6-000000000014");
    

    Then you only need to use dynamicCall( QString, QVariant ) to call any of the members the ActiveX control has. To generate a list of all available methods use:

      QString doc = activex->generateDocumentation();
    

    This is wonderful, you get an html document with all available members, properties and examples which explain how to use them (Qt Documentation tell you can use dumpdoc to generate the same info)

    Here an example on how to open a port (port number 4):

      QAxObject* activex = new QAxObject("648A5600-2C6E-101B-82B6-000000000014");
      activex->dynamicCall("SetCommPort(int)", 4);
      activex->dynamicCall("SetPortOpen(bool)", true);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This may seem like an odd question, but does anyone know the origin of
I know this may seem like a math question but i just saw this
Now this may seem like a silly question, but I need to know how
I know that this may be an amateur question but for some reason I
this may seem a little odd, but it would make for a convenient way
This may seem like a dumb question, but still I don't know the answer.
(I'm pretty new to WPF, so this question may seem obvious or inconsistent.) There
This may seem as an almost impossible question, but I wish to know how
This may seem like a really daft question, but what is the reason for
This may seem like a stupid question, but I need to know where the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.