183 |
183 |
184 @param textedit reference to the edit widget to be attached |
184 @param textedit reference to the edit widget to be attached |
185 @type QTextEdit, QWebEngineView or QWebView |
185 @type QTextEdit, QWebEngineView or QWebView |
186 @param editType type of the attached edit widget |
186 @param editType type of the attached edit widget |
187 @type str (one of "QTextEdit", "QWebEngineView" or "QWebView") |
187 @type str (one of "QTextEdit", "QWebEngineView" or "QWebView") |
188 """ |
188 @exception ValueError raised to indicate a bad parameter value |
189 assert editType in ["QTextEdit", "QWebEngineView", "QWebView"] |
189 """ |
|
190 if editType not in ["QTextEdit", "QWebEngineView", "QWebView"]: |
|
191 raise ValueError("Bad value for 'editType' parameter.") |
190 |
192 |
191 self.__textedit = textedit |
193 self.__textedit = textedit |
192 self.__texteditType = editType |
194 self.__texteditType = editType |
193 |
195 |
194 self.wordCheckBox.setVisible(editType == "QTextEdit") |
196 self.wordCheckBox.setVisible(editType == "QTextEdit") |