Tiny Core Linux

Tiny Core Extensions => TCE Q&A Forum => Topic started by: mbertrand on August 28, 2017, 02:41:41 PM

Title: Menus in QT app not working well when app is lunch via exec()
Post by: mbertrand on August 28, 2017, 02:41:41 PM
I have a simple QT app for testing purposes. It only haves a few menus that do nothing. Each menu has many sub menu items.
If I lunch my app via on boot via /home/tc/.X.d or from a icon on the wbar I have problems with the menu items. When I click on any of the menus the sub items either don't appear or disappear quickly on mouse press. Sometimes it looks like it gets a double click cause I can see the sub menu items appear and then close right away. All this happens on mouse press, I still did not release the mouse button and sub menus appear and close right away! BUT if I run my test app from a Terminal then menus work well. The only difference I can see is how my app is invoked. When it is not invoked via exec() then menus work!!! Anyone have an idea?
Title: Re: Menus in QT app not working well when app is lunch via exec()
Post by: Juanito on August 28, 2017, 02:46:00 PM
Does qt need Xorg-7.7-3d?
Title: Re: Menus in QT app not working well when app is lunch via exec()
Post by: mbertrand on August 28, 2017, 03:02:48 PM
No and I'm currently using Xvesa as xserver. I should also state thet this happens with fluxbox but if I use flwm then it only happens once for each menu clicked then it all works!!
I'm  using fluxbox. The odd thing is if I add my test app to the wbar and lunch from there the menus don't work well. Fluxbox will display it in his menu my test app and if I lunch it from there then menus work well?
Title: Re: Menus in QT app not working well when app is lunch via exec()
Post by: Juanito on August 29, 2017, 06:34:26 AM
did you try with Xorg-7.7-3d instead of Xvesa - just to see if it fixes things...
Title: Re: Menus in QT app not working well when app is lunch via exec()
Post by: mbertrand on August 29, 2017, 08:19:14 AM
No I did not and that's unfortunately not an option for me.
Title: Re: Menus in QT app not working well when app is lunch via exec()
Post by: mbertrand on August 30, 2017, 08:25:56 AM
I replace xvesa with xorg and no mouse problem but I find the painting very slow.
Title: Re: Menus in QT app not working well when app is lunch via exec()
Post by: mbertrand on August 30, 2017, 10:12:06 AM
The Xvesa from TC 5.X repo has no problems with mouse clicks but Xvesa from TC 6.X repo does. I has recently changed from TC 5 to  6 because I wanted to use the nozap arg in Xvesa but the newer one from TC 6.X repo has this mouse click problem. What to do ?
Title: Re: Menus in QT app not working well when app is lunch via exec()
Post by: mbertrand on August 30, 2017, 10:50:47 AM
Where can I get source for Xvesa and how to build it on TC?
Title: Re: Menus in QT app not working well when app is lunch via exec()
Post by: Juanito on August 30, 2017, 12:44:13 PM
The source is in tinycore git
Title: Re: Menus in QT app not working well when app is lunch via exec()
Post by: mbertrand on August 30, 2017, 01:12:19 PM
At some point you added -zozap ? Where can I find that revision? I'm not use to git and I did not really find anything.
Title: Re: Menus in QT app not working well when app is lunch via exec()
Post by: curaga on August 30, 2017, 01:25:44 PM
The old Xvesa is available in Xvesa-old.tcz, but then you wouldn't have -nozap indeed.

The difference is pretty massive, the old one was from XFree86 sources and the new one from last working Xorg, it's years of changes.
Title: Re: Menus in QT app not working well when app is lunch via exec()
Post by: mbertrand on August 30, 2017, 04:08:13 PM
Ok so the latest source is at https://github.com/tinycorelinux/tinyx.git ?
I'm thinking of trying first if I can build it and then maybe see what is going wrong with my QT application.
I fllowed some linkes as to what is need to build on Tiny Core but with no success. I will keep trying!
Title: Re: Menus in QT app not working well when app is lunch via exec()
Post by: Juanito on August 30, 2017, 04:26:15 PM
Code: [Select]
$ tce-load -i compiletc git automake libtool-dev intltool Xorg-7.7-dev
$ git clone http://git.tinycorelinux.net/tinyx
$ cd tinyx
$ ./autogen.sh
$ CC="gcc -flto -fuse-linker-plugin -march=i486 -mtune=i686 -Os -pipe" CXX="g++ -flto -fuse-linker-plugin -march=i486 -mtune=i686 -Os -pipe -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local --sysconfdir=/etc --localstatedir=/var --enable-install-setuid
$ find . -name Makefile -type f -exec sed -i 's/-g -O2//g' {} \;
$ make V=1
Title: Re: Menus in QT app not working well when app is lunch via exec()
Post by: mbertrand on August 31, 2017, 10:36:47 AM
Having lots of problems. Getting errors when I run autogen.sh.

/usr/local/bin/libtoolize: line 575: /usr/local/bin/sed: not found

configure.ac:286: error: possibly undefined macro: XTRANS_CONNECTION_FLAGS
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
Title: Re: Menus in QT app not working well when app is lunch via exec()
Post by: Rich on August 31, 2017, 11:01:29 AM
Hi mbertrand
Quote
/usr/local/bin/libtoolize: line 575: /usr/local/bin/sed: not found
Do you have  sed.tcz  installed?
Title: Re: Menus in QT app not working well when app is lunch via exec()
Post by: mbertrand on August 31, 2017, 11:08:26 AM
Yes I have sed installed. I had to give up because I ran out of time allocated. It would be nice to fix this problem with mouse. I don't think I'm the right qualified person to do this in a reasonable amount of time.. As of now no QT application can function properly with current xvesa. I will have to revert to a older working copy of xvesa but will loose the nozap argument.
Title: Re: Menus in QT app not working well when app is lunch via exec()
Post by: Rich on August 31, 2017, 11:20:21 AM
Hi mbertrand
Quote
Yes I have sed installed
The error message says otherwise. If it is installed, you should see something similar to this:
Code: [Select]
tc@box:~$ ls -l /tmp/tcloop/sed/usr/local/bin/sed
-rwxr-xr-x 1 root root 51408 Aug 15  2011 /tmp/tcloop/sed/usr/local/bin/sed
tc@box:~$
and
Code: [Select]
tc@box:~$ ls -l /usr/local/bin/sed
lrwxrwxrwx 1 root root 33 Jan 12  2017 /usr/local/bin/sed -> /tmp/tcloop/sed/usr/local/bin/sed
tc@box:~$
Title: Re: Menus in QT app not working well when app is lunch via exec()
Post by: mbertrand on August 31, 2017, 01:29:48 PM
It's BusyBox sed but I see like mentioned in prior post that there is sed.tcz. I will try it. Thanks for your time.
Title: Re: Menus in QT app not working well when app is lunch via exec()
Post by: Rich on August 31, 2017, 01:38:46 PM
Hi mbertrand
It's a dependency of  compiletc.tcz  and should have been included automatically.