How to easily emulate responsiveness of QDatetime input (i.e. open in modal on mobile but as a popover on desktop)



  • Hello,
    I have a menu with a couple options that I would like to open just like QDatetime opens - in a modal on small screens, and as a popover on desktop.
    Of course, I can always make two components and just dynamically select between which one to render, but I was wondering whether there was an easy, or rather a ‘preferred’ way to do this (that wouldn’t involve duplicating code for the menu options, etc).
    Thanks in advance!



  • Any help please?