Unable to click on QWidget with Qt:WindowStaysOnTopHint flag attribute - Mac only issue



  • I have a class
    class LocationLineEdit:public QLineEdit{
    private:
    QWidget* mpListPop;
    MySuggestionList* mpLocationListView;
    }
    on a modal dialog, which includes a popup list:
    class MySuggestionList:public MyAutoScrollArea {}
    class MyAutoScrollArea:public QScrollArea {}
    initialized as:
    mpListPop=new QWidget(pParent, Qt:Tool | Qt:WindowStaysOnTopHint | Qt:FramelessWindowHint);
    mpLocationListView = new MySuggestionList(mpListPop);

    pParent = parent dialog box (even for lineEdit)

    This issue is only on Mac. The issue here is: I am unable to click on mpListPop (as soon as mpListPop is populated and shown) though the navigation keys (left and right) are working fine.
    I can't go away with Qt::Tool. If I don't use Qt:WindowStaysOnTopHint, then mpListPop is shown behind parent widget (bug in Qt4.7 and fixed in Qt5.0. I am using Qt4.7) and using Qt:WindowStaysOnTopHint is a necessity for me.
    On Widows, this implementation (even without Qt:WindowStaysOnTopHint flag) is working perfectly fine.

    Any suggestions are welcome. Thanks in Advance.

    ~Andro



  • I remember about having this problem with Qt 4.x. Switching to Qt 5 solved it. I don't know how difficult it is about switching to Qt 5, but if this bug annoys you really, it might be worth working on the switch for a couple of hours.



  • Thanks for replying.
    Upgrading Qt is not an option for me (as I work for a small company and It will be a huge cost for us). I was trying to get a workaround for it. I am open for experimentation if you have any ideas.

    ~Andro


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.