at a Qt internal function QWidgetPrivate::create_sys
XSetWMProperties(dpy, id, 0, 0,
qApp->d_func()->argv, qApp->d_func()->argc,
&size_hints, &wm_hints, &class_hint);
splash.show(); //the program crash right here
at a Qt internal function QWidgetPrivate::create_sys
XSetWMProperties(dpy, id, 0, 0,
qApp->d_func()->argv, qApp->d_func()->argc,
&size_hints, &wm_hints, &class_hint);
splash.show(); //the program crash right here
Last edited by wysota; 9th March 2010 at 13:01.
we cross posted... see my post before yours.
==========================signature=============== ==================
S.O.L.I.D principles (use them!):
https://en.wikipedia.org/wiki/SOLID_...iented_design)
Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.
hhf (10th March 2010)
all the code can run perfectly on win32 platform , crazy me !
Qt Code:
{ setWindowOpacity(0.9); } { setWindowOpacity(0.9); } void { int left = 180; int top = 15; int bottomLimit = 75; int rightLimit = width(); titleFont.setBold(true); titleFont.setPointSize(titleFont.pointSize() + 1); painter->setFont(titleFont); painter->drawText(rect, Qt::AlignLeft, app().fullName()); } void XXXSplashScreen::show() { }To copy to clipboard, switch view to plain text mode
more nasty , it run fine in debug mode , but get a 'Segmentation fault' in release mode.
Last edited by wysota; 9th March 2010 at 13:00.
it could be that due to configuration issues, your image is not found, and thus you get a null pixmap.
Try this:
Qt Code:
XXXSplashScreen splash; //XXXSplashScreen encapsulate the QSplashScreen if(splsh.pixmap().isNull()){ qDebug()<<"nuill pixmap"; } splash.show(); //the program crash right hereTo copy to clipboard, switch view to plain text mode
and see if the debug message comes out, or you can set a break point on the debug message.
==========================signature=============== ==================
S.O.L.I.D principles (use them!):
https://en.wikipedia.org/wiki/SOLID_...iented_design)
Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.
hhf (10th March 2010)
the debug message didn't come out, the image can be found..
since it crash only in release mode, breakpoints set in the code can not work.
how to make the program debug-able in release mode?
you can put a debug message in all the methods at the beginning, and at the end, this way you will see which method started but didn't complete.how to make the program debug-able in release mode?
It will help narrow down where the problem is.
==========================signature=============== ==================
S.O.L.I.D principles (use them!):
https://en.wikipedia.org/wiki/SOLID_...iented_design)
Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.
hhf (10th March 2010)
thank you so much .
boss passed this job back to the author already .
but now I face to a bigger challenge, a man came back to Canada, leaving a 'mess' for me, he use french to name all the variables ,macros and things like that ...I don't know french at all, the code seem unfriendly to me, nightmare
Well, that is not something I can help you with, I am afraid...
==========================signature=============== ==================
S.O.L.I.D principles (use them!):
https://en.wikipedia.org/wiki/SOLID_...iented_design)
Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.
Bookmarks