I want to get the first visible textblock in the textedit. There is a function for that, but it is protected:
http://qt-project.org/doc/qt-4.8/qpl...stVisibleBlock
why is it protected? How do i do this?
I want to get the first visible textblock in the textedit. There is a function for that, but it is protected:
http://qt-project.org/doc/qt-4.8/qpl...stVisibleBlock
why is it protected? How do i do this?
you can access it in a subclass:How do i do this?
Qt Code:
class MyPlainTextEdit : public QPlainTextEdit{ //constructors, Q_OBJECT macro etc... //... public: return QPlainTextEdit::firstVisibleBlock(); } };To copy to clipboard, switch view to plain text mode
yes, this is what i do now. thank you. But it is a little wired, why is it protected? Maybe they do not want me to use that function?
I don't think so, it is "protected" not "private" after all. They just didn't want it to be a part of the public interface, I'm not very well acquainted with text editing interfaces in Qt but I guess they had some reasonsMaybe they do not want me to use that function?
Bookmarks