Breakpoint with QString Condition in QtCreator



  • Hi, is there a way how to set up more complex condition for breakpoint in QtCreator? At least comparing the QStrings. Integer comparsion like in tutorials works fine, but how about:

    void foo(QString bar){
     qDebug() << bar;
    }
    

    breakpoint on qDebug line and condition:
    bar == "BAR", or bar.equals("BAR")

    Is it possible, or just basic data types are available? If so, how?

    Thanks



  • Hi,
    Bump with same question.


  • Moderators

    Hi,

    Can you elaborate on this? What is it you want exactly?

    Eddy



  • I think I have the same problem. The condition does not seem to be evaluated. I have something like this in the condition field of my breakpoint:

    qstringVar.compare("some value") == 0
    

    However, the breakpoint is hit every iteration on that line although the qstringVar is not equal to the "some value". Why is that?


Log in to reply
 

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