I have my own subclass of QTextEdit (called Editor) for which I want to allow the user to set the tab width (ideally in number of spaces, but it looks like pixels is the only option). Anyway, using the setTabStopWidth member function doesn't do anything. I tried explicitly setting it to 200 pixels right after I declare it but, that doesn't seem to do anything. I didn't overload that function.
Q_OBJECT
public :
~Editor();
...
}
...
mCommandEdit = new Editor;
mCommandEdit->setTabChangesFocus(false);
mCommandEdit->setTabStopWidth ( 200 );
class Editor : public QTextEdit {
Q_OBJECT
public :
Editor( QWidget* parent = 0 );
~Editor();
...
}
...
mCommandEdit = new Editor;
mCommandEdit->setTabChangesFocus(false);
mCommandEdit->setTabStopWidth ( 200 );
To copy to clipboard, switch view to plain text mode
I can post more complete code if necessary, but I just want to find out if this should work like I am thinking.
Thanks.
Bookmarks