[Qt-interest] Cursor line sticks in QLineEdit
Atlant Schmidt
aschmidt at dekaresearch.com
Tue Jun 14 12:53:30 CEST 2011
Bas:
> I am trying to update QLineEdit programmatic way but I am facing strange
> problem ( please refer attached image ) . Cursor line stick in QLineedit ?
I wrote to the list back in March/April about
essentially the same problem using QSpinBoxes
(which programmatically change the included
QLineEdit). Here was my last post to the list
but you can find the entire discussion in the
archives.
Essentially, this isn't well-handled in Qt (at
least as recently as Qt 4.7.x) and cursor-hiding
seems to require setting the LineEdit to be read-
only, something you may not want to do. (It was
okay for our touchscreen spinboxes.)
Atlant
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Re: [Qt-interest] How do I turn-off/hide the text cursor in QSpinBox?
All:
Thanks for all the help, everyone!
As it turns out, to work-around various other
limitations in the Q(Abstract)SpinBox implementation
when it's used on touch-screens, we already did have
QSpinBox subclassed and had already been assigning
a new QLineEdit to the subclass.
So by Friday afternoon, I was doing exactly what has
been suggested and attempting to set just the QLineEdit
to "Read Only". Done in the QSpinBox constructor (after
we've done the setLineEdit() to substitute our own
QLineEdit instance), this didn't work; some initialization
farther down the road clears the Read-Only status.
Today, I took a big hammer and simply re-asserted the
Read-Only status with every step taken by the spin-box:
lineEdit()->setReadOnly(true);
That works.
But when I look at all the work we've done to make
spin boxes work for us (in our touch screen environment),
I'm pretty sure we'd have been better-off if we hadn't
used Q(Abstract)SpinBox at all and simply used two of
our "Sound-making pushbuttons" and a QLabel to display
the results.
There really needs to be a simple class for Spinboxes
on touchscreens that doesn't carry all the burdens of
this QLineEdit-based class.
Atlant
________________________________
From: qt-interest-bounces+aschmidt=dekaresearch.com at qt.nokia.com [mailto:qt-interest-bounces+aschmidt=dekaresearch.com at qt.nokia.com] On Behalf Of mail Bas
Sent: Tuesday, June 14, 2011 03:01
To: qt-interest at qt.nokia.com
Subject: [Qt-interest] Cursor line sticks in QLineEdit
Hi Geeks,
I am trying to update QLineEdit programmatic way. but I am facing strange problem ( please refer attached image ) . Cursor line stick in QLineedit ?
Please let me know what I am doing wrong.
Regards
Bas
Click here<https://www.mailcontrol.com/sr/hsHqiVGORMjTndxI!oX7Uj80y4Ou3KxpUzl8anvz0!vQpQVLDNIFZTZAQ1ICD44IXvT!cBpuimQua8zCo+pDiw==> to report this email as spam.
________________________________
This e-mail and the information, including any attachments, it contains are intended to be a confidential communication only to the person or entity to whom it is addressed and may contain information that is privileged. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify the sender and destroy the original message.
Thank you.
Please consider the environment before printing this email.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110614/c2a5b0db/attachment.html
More information about the Qt-interest-old
mailing list