Witam
chcialem jeszcze cos dodac do notatnika :
textEdit = new QTextEdit(this);
highlighter = new Highlighter(textEdit->document());
QCompleter = new TextEdit(textEdit->document());
chodzi o "Custom Completer Example"..
to jest textedit.h
#ifndef TEXTEDIT_H
#define TEXTEDIT_H
#include <QTextEdit>
class QCompleter;
class TextEdit : public QTextEdit
{
Q_OBJECT
public:
TextEdit(QCompleter *parent = 0);
~TextEdit();
void setCompleter(QCompleter *c);
QCompleter *completer() const;
protected:
void keyPressEvent(QKeyEvent *e);
void focusInEvent(QFocusEvent *e);
private slots:
void insertCompletion(const QString &completion);
private:
QString textUnderCursor() const;
private:
QCompleter *c;
};
#endif // TEXTEDIT_H
kawalek mywindow.h
QAction *fileMenuFont;
QAction *fileMenuDrukujPrzeglad;
QAction *fileMenuDrukuj;
Highlighter *highlighter;
QCompleter *completer;
TextEdit *completingTextEdit;
private slots:
void New();
void Open();
nie ma bledu.. tylko ze nie pokazuje na notatniku..
wie ktos jak to zrobic ??