PDA

View Full Version : signal for QTextEdit



bismitapadhy
24th December 2009, 07:40
I want a signal when QTextedit got focus and rightclick editor select all is enabled.

Whenever we right click in the editor menu, select all is disabled if editor content is empty.
This select all i want to disable from the edit mni.Which signal help me to do like this.

Lykurg
24th December 2009, 10:03
see QWidget::customContextMenuRequested() and QApplication::focusChanged() or QWidget::focusInEvent().

bismitapadhy
24th December 2009, 10:33
see QWidget::customContextMenuRequested() and QApplication::focusChanged() or QWidget::focusInEvent().
this signal will generate whenever anything on customContext Menu changed, i want the signal only for select all.
whenever context menu select all is enableed, i want to enable edit menu select all, when ever edit menu select all is disabled, i want to disable edit menu select all. How can ii do it, please suggest me any idea?

Lykurg
24th December 2009, 11:06
use QWidget::customContextMenuRequested() and QWidget::actions() to manipulate the state of actions or build your own menu inside that function.

bismitapadhy
24th December 2009, 11:16
use QWidget::customContextMenuRequested() and QWidget::actions() to manipulate the state of actions or build your own menu inside that function.

I am beginner of Qt. can you please tell me ,if use customContextMenuRequested(Qpoint) as a signal, it is required to write our own function for slot or any default function is available?

Tanuki-no Torigava
25th December 2009, 14:23
If you need to process something custom - you have to add your own slot where you will do that and connect the signal to your custom slot.