where i can find ScrollDownToBottom signal for QtextEdit
-
Actually, i have a qtextedit consists of license acceptance text for my gui tool, i want to make "accept" button enable when user scroll down to bottom, to make sure that user have read whole text. so all i need is to have signal that i can emit when scroll comes down to bottom,
Is there any available slots for this or we hav to implement, in any case please help me out. -
Hi,
One way I see is to connect to the valueChanged of the vertical scroll bar and enable the button once it has reach the maximum value set on it.
-
Hi,
One way I see is to connect to the valueChanged of the vertical scroll bar and enable the button once it has reach the maximum value set on it.
-
Hi
Just to be clear.
Its the scrollbar that has signal. not directly the TextEdit
so basically its#include <QScrollBar> ... QScrollBar* sbar = ui->textEdit->verticalScrollBar(); QPushButton* Acceptbutton = ui->pushButton; Acceptbutton->setEnabled(false); // make it start off connect(sbar, &QScrollBar::valueChanged, [sbar, Acceptbutton]() { Acceptbutton->setEnabled( sbar->value() == sbar->maximum() ); } );
Note that if u scroll up again it becomes disabled again but
it might not matter for this use case :)