Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

QDialog does not sense click when argument are passed



  • Hello everyone,
    I'm facing a really strange problem. I'm developing an application for linux embedded platform (imx6 0659). I already designed a lot of window which are working correctly. Some of them are created passing some argument in the constructor (es. Anagrafica(QWidget *parent, QString sNewpat, bool bSelection)) and they are all working fine. Now I added a new window to the project, by now I only added a qpushbutton to go back (this->reject), but, if I change the constructor of this window passing any argument, as already done for some other window of the project, this window (which is ApplicationModal like the others) doesn not work correctly: it is impossible to click button and go back (click is not sensed). If I remove the argument in the constructor, the button works correctly (so, the window is sensing click).
    I'm pretty sure I created this new window like all the others, this thing is very strange to me!
    Any help would be really apprecieated!
    marco Chiesi


  • Qt Champions 2019

    @MarcoChiesi79 What is this parameter and how is it used? How do you create the instance of that window (actually dialog, right?)?



  • @jsulm Hi,
    it's not a matter of parameter type, or how I'm using it. Any parameter, even if not used, give the problem.
    Window is a normal Ui window opened throug exec().
    By now, I solved changing window type from ApplicationModal to WindowModal, and this for me is good too, because now the window works as it should and it is not possible to click the calling window as I wanted.
    What I do not understand now, is why other windows of the project, called and created in the same way, passing arguments in the constructor, can be ApplicationModal without giving similar problem.
    Surely I do not understand this because I'm a newbie
    Thank you for answering!
    Marco Chiesi


  • Qt Champions 2019

    @MarcoChiesi79 Well, I don't understand that either. Without more information and/or code it is hard to say.


Log in to reply