how to make a customized constructor in Qt ...
-
I'm triying to make a customized constructor like this
class SelectPlanDialog : public QDialog
{
Q_OBJECTpublic:
explicit SelectPlanDialog(QWidget *parent = 0);
explicit SelectPlanDialog(QStringList &idChsed, QStringList &planChsed, int maxSampleSize);
...
and for some reason it doesnt work...pls how can i fix it? -
Hi
in what way "doesnt work" ?Do you get compile error?
-
@mrjj
when i run it the solution have an error, something with "test.exe a quitté avec code -1073741819"@kasysbi said in how to make a customized constructor in Qt ...:
quitté avec code
Is that something like "Application closed with error code -1073741819" ?
Why do you think its related to your constructor ?
-
@kasysbi said in how to make a customized constructor in Qt ...:
quitté avec code
Is that something like "Application closed with error code -1073741819" ?
Why do you think its related to your constructor ?
-
@kasysbi said in how to make a customized constructor in Qt ...:
quitté avec code
Is that something like "Application closed with error code -1073741819" ?
Why do you think its related to your constructor ?
-
explicit keyword means that you want to explicitly pass the parameter with the same type without implicit conversion made by the compiler.
Try to kick off the explicit and see what happens
Thanks
-
@mrjj
i think its related to my constructor because at the time i try not to overload that constructor everything work fine. Then i overload it aigain and this appear to my screen
with that error code -1073741819 -
explicit keyword means that you want to explicitly pass the parameter with the same type without implicit conversion made by the compiler.
Try to kick off the explicit and see what happens
Thanks
@Charlie_Hdz
i were right...i did as you said, removed the explicit type and it finaly worked. thanks!