Wireshark mailing list archives

Qt inputMask - spaces in "Go to packet" field


From: chuck c <bubbasnmp () gmail com>
Date: Tue, 14 Jul 2020 15:11:21 -0500

The entry field for Go to packet (Go->Go to Packet... or "Go to specified
packet" toolbar icon)
is checked with inputMask. (hate to say validated because that's something
different in Qt)
inputMask pads the input field with spaces by default.
Click in the center or left side of the entry box, the input field is all
spaces and can't enter text.
The Stackoverflow post has a possible fix but Qt is well above my pay grade.

This is the only spot I can find inputMask used. Great time to set a
precedent for future use?

Thoughts?
chuckc


https://code.wireshark.org/review/gitweb?p=wireshark.git;a=blob;f=ui/qt/main_window.ui

          <widget class="QLineEdit" name="goToLineEdit">
           <property name="inputMask">
            <string>900000000</string>
           </property>
          </widget>

https://doc.qt.io/qt-5/qlineedit.html#inputMask-prop
   inputMask : QString
   This property holds the validation input mask.

https://stackoverflow.com/questions/57248611/inputmask-fills-qlineedit-with-spaces
"By default QLineEdit will set the cursor based on the position of the
click, and in the case that the number of characters is restricted as in
your case and if you press outside the valid sector then the cursor will be
placed on the right edge of that sector."
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev () wireshark org>
Archives:    https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request () wireshark org?subject=unsubscribe

Current thread: