Access and inheritance
-
@tomy
Hi
Yes, that could be the first step.
Maybe a bit of stylesheet to make QToolbar more flat to fit the new icons.
I dont have an image of spreadsheet app around so im not sure what else you can
do currently. will write of get any other ideas. -
Beautiful system, right? :)
Right. :)
Yes, that could be the first step.
Maybe a bit of stylesheet to make QToolbar more flat to fit the new icons.
I dont have an image of spreadsheet app around so im not sure what else you can
do currently. will write of get any other ideas.Hi, Thanks. So I need to lookup "stylesheet".
-
-
@mrjj Hi,
I created a new project called MySpreadsheet and added a few more options to the context menu and renewed the icons to flat ones.
Now when I run the project, it runs normally, but when we close it, the follwoing message is written in the Application Output window:Starting D:\Projects\Qt\MySpreadsheet\MySpreadsheet\build-MySpreadsheet-Desktop_Qt_5_12_0_MinGW_64_bit-Debug\debug\MySpreadsheet.exe...
FTH: (243752): *** Fault tolerant heap shim applied to current process. This is usually due to previous crashes. ***
The program has unexpectedly finished.
The process was ended forcefully.
D:/Projects/Qt/MySpreadsheet/MySpreadsheet/build-MySpreadsheet-Desktop_Qt_5_12_0_MinGW_64_bit-Debug/debug/MySpreadsheet.exe crashed.What is the problem please?
Is it not related to the .pro file, please? -
Hi
It is the list to the right we are after
The code
for entries Level 2,3 would help a lot. -
Hi
it was not what i as i had hoped, it being inside some of the user code.
I wonder if you have a double free.
Did you change anything in main.cpp? -
@mrjj Hi,
Here is
main.cpp
:#include "myspreadsheet.h" #include <QApplication> #include <QSplashScreen> int main(int argc, char *argv[]) { QApplication app(argc, argv); QSplashScreen* splash = new QSplashScreen; splash->setPixmap(QPixmap(":/images/splash.jpg")); splash->show(); Qt::Alignment topRight = Qt::AlignRight | Qt::AlignTop; splash->showMessage(QObject::tr("Setting up the main window..."), topRight, Qt::white); MySpreadsheet* mySP = new MySpreadsheet; if(argc > 1) mySP -> loadFile(argv[1]); mySP -> show(); splash -> finish(mySP); delete splash; return app.exec(); }
I added those splash stuff and now apparently it's fine!
-
Hi
Does look fine.
Try set breakpoint in main.cpp and press f10 to signle step over it and
see if we can find the reason for the crash.
Since its first on close, it might be inside MySpreadsheet indirectly. -
@mrjj Hi,
The faulty one didn't include splash stuff and was this way I think:
#include "myspreadsheet.h" #include <QApplication> int main(int argc, char *argv[]) { QApplication app(argc, argv); MySpreadsheet* mySP = new MySpreadsheet; mySP -> show(); return app.exec(); }
Then I added the splash stuff. Now it "apparently" is fine, but I'm still not sure not do I know of the exact reason for that red message either. :(
-
You are not deleting
mySP
. The memory will be cleaned up at the end of the application but this doesn't mean that the destructor will be called. So if you have anything there that does something it's not guaranteed to be called.You should rather keep it on the stack or delete it after returning from
app.exec()
;