Qextserialport question



  • Anybody using qextserialport lib?

    Why would the code below cause a memory error, it will work fine in main.cpp:

    @Test::Test(QWidget *parent, Qt::WFlags flags)
    : QMainWindow(parent, flags)
    {
    QList<QextPortInfo> ports = QextSerialEnumerator::getPorts();
    }
    @

    Edit : @ tags added by Eddy



  • What exactly is the error you get, how are you instantiating Test?



  • Thanks for trying to help, Error I get is :

    HEAP[Test.exe]: Invalid address specified to RtlValidateHeap( 00910000, 00E97230 )
    Windows has triggered a breakpoint in Test.exe. The break point it shows is at this location in qpalette.cpp file:

    @/*!
    Destroys the palette.
    */
    QPalette::~QPalette()
    {
    if(!d->ref.deref())
    delete d;
    }@


    I instantiate test in main.cpp as:

    @int main(int argc, char *argv[])
    {
    QApplication a(argc, argv);

    Test w;

    w.show();
    return a.exec();
    }@


  • Moderators

    Please be sure to wrap all your code in @ tags. Thanks!


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.