Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. qt-5.7.1, gtk-3.0, input device
Forum Updated to NodeBB v4.3 + New Features

qt-5.7.1, gtk-3.0, input device

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 2 Posters 1.7k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    huojia
    wrote on last edited by
    #1

    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.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      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 ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • H Offline
        H Offline
        huojia
        wrote on last edited by
        #3

        @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"

        #EndSection

        #Section "InputDevice"

        Identifier "Keyboard0"

        Driver "kbd"

        Option "Device" "/dev/input/event2"

        Option "XkbLayout" "us"

        Option "XkbModel" "pc105"

        Option "CoreKeyBoard"

        #EndSection

        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

        EndSection

        Section "Screen"
        Identifier "Screen0"
        Device "Allwinner A10/A13 FBDEV"
        Monitor "Monitor0"

        DefaultDepth 16

        SubSection "Display"

        Depth 16

        Modes "1920x1080" "1280x720"

        EndSubSection

        EndSection

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

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

        EndSection

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

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

        EndSection

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

        and if I start qt app first, like :
        ./qt-app-name &
        and then :
        ./gtk-app-name
        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.

        1 Reply Last reply
        0
        • H Offline
          H Offline
          huojia
          wrote on last edited by
          #4

          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.

          1 Reply Last reply
          0
          • H Offline
            H Offline
            huojia
            wrote on last edited by
            #5

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

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              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 ?

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved