[Qt-interest] How to lock QSplitter contents?
Malyushytsky, Alex
alex at wai.com
Fri Sep 4 23:44:07 CEST 2009
I have not tested, but splitter is moved by mouse, so you could
install a filter (void QObject::installEventFilter ( QObject * filterObj ) )
and prevent QSplitterHandle to receive the related events, which I believe are:
void QSplitterHandle::mousePressEvent(QMouseEvent *e)
void QSplitterHandle::mousePressEvent(QMouseEvent *e)
void QSplitterHandle::mouseReleaseEvent(QMouseEvent *e)
This means user would not be able to move anything.
Also you would need to fix the cursor for QSplitterHandle do not show split cursor.
It is set in setOrientation.
You may just set normal cursor instead.
Regards,
Alex
-----Original Message-----
From: qt-interest-bounces at trolltech.com [mailto:qt-interest-bounces at trolltech.com] On Behalf Of Sergei Stolyarov
Sent: Friday, September 04, 2009 9:31 AM
To: qt-interest at trolltech.com
Subject: [Qt-interest] How to lock QSplitter contents?
Hello.
I want to lock QSplitter''s widgets, i.e. hide handles and don't allow
resizing using mouse. Is it possible? I've tried to hide handles but
hide() method on QSplitter:handle() results doesn't hide anything
actually. Also tried to set handle width to 0 — with the same result.
--
Sergei Stolyarov
_______________________________________________
Qt-interest mailing list
Qt-interest at trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-interest
---------------------------------------------------------------------------------------------------
Weidlinger Associates, Inc. made the following annotations.
“This message and any attachments are solely for the intended recipient and may contain confidential or privileged information. If you are not the intended recipient, any disclosure, copying, use, or distribution of the information included in this message and any attachments is prohibited. If you have received this communication in error, please notify us by reply e-mail and immediately and permanently delete this message and any attachments. Thank you.”
“Please consider our environment before printing this email.”
More information about the Qt-interest-old
mailing list