Skip to content
  • MT4 Manager API on QT

    Unsolved General and Desktop
    5
    0 Votes
    5 Posts
    194 Views
    B

    Hi.

    Thank you for the explanation.

    @Pl45m4 said in MT4 Manager API on QT:

    Since the MT4 API is probably incompatible with QTcpSocket by default and you probably need to use the Manager's connect function to make everything that is going on in the background work properly, I don't see why you need to use the Qt socket classes, assuming this MT4 Manager has its own internal socket stuff?!
    I could be wrong, though.

    Yes this is correct. The only thing is that, when i use the MT4 Manager to connect to the server, it always returns "no connection" error, which means, the MT4 Manager can't establish connection to the server, of which the server is online and i have run the C++ program with the same server credentials.

  • 0 Votes
    10 Posts
    4k Views
    J

    A little more info after starting a 2nd debug session.

    I set a breakpoint so that I could walk through the first call to QAbstractItemView::event -> QAbstractScrollArea::event -> QPainter::QPainter -> QPainter::begin

    The first call to redirected has the redirectedDev pointer in the QPaintDevice pointing to a valid QPaintDevice with a QImage, 7 slots in the __vfptr that look valid, and both the painters and reserved member variables set to 0 (zero):

    redirectDev 0x0d3ea70c {d=0x0d3ea760 } QPaintDevice * [QImage] {d=0x0d3ea760 } QImage __vfptr 0x0551c988 const QImage::`vftable' * [0x0] 0x050113fa QImage::`vector deleting destructor'(unsigned int) * [0x1] 0x04ff8ae9 QImage::devType(void) * [0x2] 0x04ffe27d QImage::paintEngine(void) * [0x3] 0x0500b077 QImage::metric(enum QPaintDevice::PaintDeviceMetric) * [0x4] 0x05001757 QPaintDevice::initPainter(class QPainter *) * [0x5] 0x04ff570e QPaintDevice::redirected(class QPoint *) * [0x6] 0x04ff9246 QPaintDevice::sharedPainter(void) * painters 0x0000 unsigned short reserved 0x00000000 QPaintDevicePrivate *

    The redirectDev is a QTableView member variable that's already been populated. I will run through a few cycles to see if this value is changing.

  • 0 Votes
    4 Posts
    2k Views
    Halo_HaoH

    @JKSH Copy that. Thanks a lot for your kind help.