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

Java qtjambi-4.5.2 WindowFlags



  • Hi can someone help me with WindowFlags? I am using qtjambi-4.5.2 and I really can't figure out how to do it in Java.
    Basically, I need '?' mark disappear from the window, I guess it's Qt.WindowContextHelpButtonHint. But I have a real trouble to find correct syntax.

    Best regards
    David


  • Lifetime Qt Champion

    @David-Krupi said in Java qtjambi-4.5.2 WindowFlags:

    WindowContextHelpButtonHint

    Hi
    in c++ , it would be

    setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);

    a more step by step would be

    Qt::WindowFlags flags = windowFlags(); // get current flags

    Qt::WindowFlags helpFlag =Qt::WindowContextHelpButtonHint; // just variable. not really needed.

    flags = flags & (~helpFlag); // here we AND + NOT (negate) the flag out. we do this to keep any other values already set

    now set it back
    setWindowFlags(flags);

    I hope syntax for bit function is the same in java :)


Log in to reply