I have in Konstruktor a setCentralWidget defined,
MainWin::MainWin()
{
plotter = new Plotter; //Plotter is a custom Widget
setCentralWidget(plotter);
}
MainWin::MainWin()
{
plotter = new Plotter; //Plotter is a custom Widget
textEdit = new QTextEdit;
setCentralWidget(plotter);
}
To copy to clipboard, switch view to plain text mode
in function changeToText(), and changeToPlotter(), I want to change the central Widget
so write:
MainWin::changeTotext()
{
setCentralWidget(textEdit);
}
MainWin::changeToPlotter()
{
setCentralWidget(plotter);
}
MainWin::changeTotext()
{
setCentralWidget(textEdit);
}
MainWin::changeToPlotter()
{
setCentralWidget(plotter);
}
To copy to clipboard, switch view to plain text mode
but at last i can`t change it, what`s wrong?
thanks for your help!
Bookmarks