Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Develop a RDP client in QT
Forum Updated to NodeBB v4.3 + New Features

Develop a RDP client in QT

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 3 Posters 1.4k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    P25B
    wrote on last edited by
    #1

    Hi all,

    I need to develop a QT/C++ application from which I could connect to another PC over RDP. I have been searching and I found that if I use QAxWidget it allows me to select the Active X control type and the Microsoft RDP COM Object is eligible. However, I am quite new in QT, and I have a few questions. Up to now, I tried to set the IP, the user and try to connect by the following code but, nothing really has happened (no errors, no debugging comments but it does nothing):

    #include "mainwindow.h"
    #include "ui_mainwindow.h"
    
    MainWindow::MainWindow(QWidget *parent)
        : QMainWindow(parent)
        , ui(new Ui::MainWindow)
    {
        ui->setupUi(this);
        ui->RDP_Viewer->setControl(QString::fromUtf8("{301B94BA-5D25-4A12-BFFE-3B6E7A616585}"));
        ui->RDP_Viewer->setProperty("Server", "XXX.XXX.XXX.XXX");
        ui->RDP_Viewer->setProperty("UserName", "User");
    }
    
    MainWindow::~MainWindow()
    {
        delete ui;
    }
    
    
    void MainWindow::on_pushButton_clicked()
    {
        ui->RDP_Viewer->dynamicCall("Connect()");
    }
    
    

    So, what I am doing wrong?
    There is something missing?

    If someone could help me I would appreciate.

    Thanks in advanced,

    1 Reply Last reply
    0
    • P Offline
      P Offline
      P25B
      wrote on last edited by
      #2

      Hi all,

      I will appreciate any other possible solution, even if it means to start from scratch.

      Thank you for your help

      jsulmJ 1 Reply Last reply
      0
      • P P25B

        Hi all,

        I will appreciate any other possible solution, even if it means to start from scratch.

        Thank you for your help

        jsulmJ Offline
        jsulmJ Offline
        jsulm
        Lifetime Qt Champion
        wrote on last edited by
        #3

        @P25B I'm not a RDP expert, but don't you have to authenticate you (password?)?

        https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0
        • P Offline
          P Offline
          P25B
          wrote on last edited by
          #4

          Hi @jsulm

          As long as I know, once you connect the password is asked. At least the rdp client of windows works like that.

          JonBJ 1 Reply Last reply
          0
          • P P25B

            Hi @jsulm

            As long as I know, once you connect the password is asked. At least the rdp client of windows works like that.

            JonBJ Offline
            JonBJ Offline
            JonB
            wrote on last edited by
            #5

            @P25B
            I don't think we know the details of how the MS RDP ActiveX control works. For example, maybe your usage falls foul of https://docs.microsoft.com/en-us/windows/win32/termserv/providing-for-rdp-client-security. There seems to be an awful lot to read through starting from https://docs.microsoft.com/en-us/windows/win32/termserv/remote-desktop-activex-control plus all related sections. I could not spot simple example code of what they said is required to set up a connection successfully. Where did you get your code from for your simple way of setting up to call this RDP_Viewer->dynamicCall("Connect()");? And if that does nothing/fails, are there not calls to find out what happened or test for/display any error?

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved