How can i create a new QTextEdit (as a new window - not child) with some extra wflags?
The constructor doesn't allow for this - it looks like this:
QTextEdit::QTextEdit( QWidget *parent,
const char *name
) : QScrollView
( parent, name, WStaticContents | WRepaintNoErase | WResizeNoErase
)
QTextEdit::QTextEdit( QWidget *parent, const char *name ) : QScrollView( parent, name, WStaticContents | WRepaintNoErase | WResizeNoErase )
To copy to clipboard, switch view to plain text mode
I could use QWidget::setWFlags, but it doesn't work:
{
Q_OBJECT
public:
{
setWFlags(WType_TopLevel | WNoAutoErase | WStyle_Customize | WX11BypassWM | WStyle_StaysOnTop | WDestructiveClose);
setText("aaa");
show();
}
};
AAA *a;
a = new AAA(0);
class AAA : public QTextEdit
{
Q_OBJECT
public:
AAA::AAA(QWidget * parent) : QTextEdit(parent, "")
{
setWFlags(WType_TopLevel | WNoAutoErase | WStyle_Customize | WX11BypassWM | WStyle_StaysOnTop | WDestructiveClose);
setText("aaa");
show();
}
};
AAA *a;
a = new AAA(0);
To copy to clipboard, switch view to plain text mode
Qt creates normal window
Bookmarks