Home > other >  QTextEdit: : textCursor () how to use, because is protected, compile error
QTextEdit: : textCursor () how to use, because is protected, compile error

Time:11-21

I am using is the location of the cursor in the QT3 want textedit, namely get cursor on the number of rows and columns, check the documentation, think only QTextEdit: : textCursor () is available, but do not know how to do?? Compile-time errors are proteced, bother have know how to make prompt, or is there any other way?? Appreciate, thank you

CodePudding user response:

The moderator's adult, help ah, I was the feeling

CodePudding user response:

Than, please help

CodePudding user response:

Class A {public: protected: int textCursor const () {return I; } private: int I; }; Class B: public A {public: int textCursor const () {return A: : textCursor (); }}; Int main (int arg c, char * argv []) {B B; Int I=b.t extCursor (); return 0; } use this method inherited QTextEdit textCursor function

CodePudding user response:

Inside the QT3 didn't find QTextCursor this class, and the function of the return type is QTextCursor type, how to do

CodePudding user response:

Question and answer period for almost a year, and I won't
  • Related