Problem with saving function (overwrite file which saved by dialog)
-
@Wieland
Hi, thank you for the exampleif (!mySaveFunction()) { m_fileName.clear(); // saving failed. clear m_fileName so the QFileDialog will come up again next time }This Code is not working...
C:\Users\Henrik\Documents\TextPad\pagestextedit.cpp:557: Fehler: could not convert 'PagesTextEdit::saveUnderDocument()' from 'void' to 'bool' if (!saveUnderDocument()) { ^I have void MainWindow::save....
and not boolHow can i Change it?
One Problem is existing..
When i open a file e.g. from Desktop and i write something in and want to save it with mySaveFunction i get an runtime error...
Do you know why?Thanks a lot
@HenrikSt.
The Code which is not working i fixed it...But the other Problem not
-
@Wieland
Hi, thank you for the exampleif (!mySaveFunction()) { m_fileName.clear(); // saving failed. clear m_fileName so the QFileDialog will come up again next time }This Code is not working...
C:\Users\Henrik\Documents\TextPad\pagestextedit.cpp:557: Fehler: could not convert 'PagesTextEdit::saveUnderDocument()' from 'void' to 'bool' if (!saveUnderDocument()) { ^I have void MainWindow::save....
and not boolHow can i Change it?
One Problem is existing..
When i open a file e.g. from Desktop and i write something in and want to save it with mySaveFunction i get an runtime error...
Do you know why?Thanks a lot
@HenrikSt. said:
Do you know why?
No.
-
@HenrikSt. said:
Do you know why?
No.
-
@HenrikSt.
But you understand my Problem? -
The cause for that crash can be everything!
How should anybody know what it is without your code?
Did you try to debug your program to see where it crashes?