Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Somehow != doesn't work as I think it should

Somehow != doesn't work as I think it should

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
5 Posts 4 Posters 1.1k 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.
  • 0 Offline
    0 Offline
    07Pepa
    wrote on last edited by A Former User
    #1

    i found out you can not do not eqal !=...... it does not work!

    repare IT

    [Edit: Thread title changed -- @Wieland]

    A E 2 Replies Last reply
    0
    • 0 07Pepa

      i found out you can not do not eqal !=...... it does not work!

      repare IT

      [Edit: Thread title changed -- @Wieland]

      A Offline
      A Offline
      ambershark
      wrote on last edited by
      #2

      @07Pepa Works for me... here's an example from one of my apps:

                          if (button == "Enter" && pin != '') {
                              pwField.accepted(pin)
                              pwFieldText.text = ""
                              pin = ''
                              return
                          }
      

      What exactly is not working for you? Show us the code, maybe you are using it wrong or what you are expecting is incorrect based on your variable state.

      My L-GPL'd C++ Logger github.com/ambershark-mike/sharklog

      1 Reply Last reply
      2
      • 0 07Pepa

        i found out you can not do not eqal !=...... it does not work!

        repare IT

        [Edit: Thread title changed -- @Wieland]

        E Offline
        E Offline
        Eeli K
        wrote on last edited by
        #3

        @07Pepa

        1. Certainly you can, and it works.
        2. This is not a Qt Company's support forum, this is volunteer based user-to-user forum, so we mostly don't do repairs.
        3. If your code doesn't work, show it to us and maybe we can help.
        1 Reply Last reply
        4
        • 6thC6 Offline
          6thC6 Offline
          6thC
          wrote on last edited by
          #4

          I've had support log a call for something that maybe this:
          https://bugreports.qt.io/browse/QTBUG-59204 - is this symptoms you mean?

          It's possible to have the line indicator confused - but the actual execution is still ok.
          I found removing all spaces in these circumstances seemed to make things happy.

          It's just my guess... This is literally the worst request for help I've could imagine - a "doesn't work - fix it" call, totally horrid.

          Maybe provide some code, contex, steps to reproduce ... and if you go to that much effort you mose well have searched for and logged a bug report (if you do actually have something) that way it's better for you and everyone else too.

          1 Reply Last reply
          0
          • E Offline
            E Offline
            Eeli K
            wrote on last edited by
            #5

            One could also speculate that in some cases !== should be used instead of != because the former means something like "not identical to" and the latter "not similar to" in javascript.

            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