qt-5.7.1, gtk-3.0, input device

  • Does anyone occur to run a qt app and a gtk app together? I run a gtk app first, mouse and keyboard can work, then I run a qt app in backstage, I guess mouse and keyboard focus on the qt app now, cos the gtk app can't capture the mouse and keyboard event, and when I killed the qt app process, the gtk app works fine. BTW, they both run in fullscreen. Anyway, help !!! and thx in advance.

  • Lifetime Qt Champion

    Hi and welcome to devnet,

    You have to give more details about your setup.

    What Linux distribution are you running ?
    What window manager ?
    How do you start your applications ?

  • @SGaist said in qt-5.7.1, gtk-3.0, input device:

    Linux distribution

    oh, sorry, new here.
    Actually, I'm running on a embedded device, it's a tidy linux filesystem and no gnome, window manager is X11.
    This is how I start X11: /home/mybin/Xorg -pixmap32 vt13 -config /etc/X11/xorg.conf &; export DISPLAY=:0.0.
    cat /etc/X11/xorg.conf:

    This is a minimal sample config file, which can be copied to

    /etc/X11/xorg.conf in order to make the Xorg server pick up

    and load xf86-video-fbturbo driver installed in the system.

    When troubleshooting, check /var/log/Xorg.0.log for the debugging

    output and error messages.

    Run "man fbturbo" to get additional information about the extra

    configuration options for tuning the driver.

    #bc debug don't use follow setcion.auto use evdev by /usr/share/X11/xorg.conf.d
    #Section "InputDevice"
    # Identifier "Mouse0"
    # Driver "mouse"
    # Option "Device" "/dev/input/mice"
    # Option "CorePointer"

    #Section "InputDevice"
    # Identifier "Keyboard0"
    # Driver "kbd"
    # Option "Device" "/dev/input/event2"
    # Option "XkbLayout" "us"
    # Option "XkbModel" "pc105"
    # Option "CoreKeyBoard"

    Section "Monitor"
    Identifier "Monitor0"
    Option "DPMS" "false" #power of monitor
    # Modeline "1920x1080" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync
    # Modeline "1280x720" 74.50 1280 1344 1472 1664 720 723 728 748 -hsync +vsync

    Section "Screen"
    Identifier "Screen0"
    Device "Allwinner A10/A13 FBDEV"
    Monitor "Monitor0"
    # DefaultDepth 16
    # SubSection "Display"
    # Depth 16
    # Modes "1920x1080" "1280x720"
    # EndSubSection

    Section "Device"
    Identifier "Allwinner A10/A13 FBDEV"
    Driver "fbturbo"
    Option "fbdev" "/dev/fb0"

        Option          "SwapbuffersWait" "true"
    Option		"HWCursor" "false"


    Section "ServerFlags"
    Option "DontZap" "True"
    Option "DontVTSwitch" "True"

    Option "BlankTime"	 "0"
    Option "StandbyTime" "0"
    Option "SuspendTime" "0"
    Option "OffTime"	 "0"


    How I start applications :
    and then :
    ./qt-app-name &
    and then :
    killall qt-app-name

    and if I start qt app first, like :
    ./qt-app-name &
    and then :
    mouse can work for gtk app, but keyboard can't, and now I can sure that the keyboard still focus on the qt app.
    Thank you for your reply.

  • What could cause qt app to monopolize the keyboard resource???
    I run a simple qt app just to show a picture in fullscreen, and then run the gtk app, and no such problem.

  • setWindowModality(),,,exec(),,,what else?

  • Lifetime Qt Champion

    How did you compile Qt ?

    It sounds like the Qt application only serves as some sort of splash screen.

    Can you explain a bit more how your system should be working ?

Log in to reply

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