Important: Please read the Qt Code of Conduct -

Different behaviors of QDateEdit Widget on different PCs

  • I'm using two identical QDateEdit widgets, they're used in the format MM/DD/YYYY, when I run the application, they work as expected, but when I generate the executable using pyinstaller, a weird behavior happens at the other PC I'm working on.

    Although, By default, QDateEdit prevents out of range dates.

    On the other PC, one of the QDateEdit widgets work with another format DD/MM/YYYY, and the other works as expected, I don't know where the problem might be, and any help would be great.


  • Lifetime Qt Champion

    Without code it's hard to guess. I would create a simple test example which only consist of two dateedit to check if the behavior still exits. If not there must be something other wrong in your code.

  • I've figured out the reason, one of the dateedit widgets was following the local date convention for the OS, but the other weren't.

    But I don't know how to make sure that on other PCs they won't follow OS convention.

    I did so by modifying displayformat for both widget to be M/d/yyyy in the qt designer instead of MM/dd/yyyy, But i think there must be another way as through this I don't know why this particular change made the widget not following the OS date display convention

Log in to reply