WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Menus in QT app not working well when app is lunch via exec()  (Read 3649 times)

Offline mbertrand

  • Full Member
  • ***
  • Posts: 225
Menus in QT app not working well when app is lunch via exec()
« on: August 28, 2017, 11:41:41 AM »
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?

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: Menus in QT app not working well when app is lunch via exec()
« Reply #1 on: August 28, 2017, 11:46:00 AM »
Does qt need Xorg-7.7-3d?

Offline mbertrand

  • Full Member
  • ***
  • Posts: 225
Re: Menus in QT app not working well when app is lunch via exec()
« Reply #2 on: August 28, 2017, 12: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?
« Last Edit: August 28, 2017, 12:06:24 PM by mbertrand »

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: Menus in QT app not working well when app is lunch via exec()
« Reply #3 on: August 29, 2017, 03:34:26 AM »
did you try with Xorg-7.7-3d instead of Xvesa - just to see if it fixes things...

Offline mbertrand

  • Full Member
  • ***
  • Posts: 225
Re: Menus in QT app not working well when app is lunch via exec()
« Reply #4 on: August 29, 2017, 05:19:14 AM »
No I did not and that's unfortunately not an option for me.

Offline mbertrand

  • Full Member
  • ***
  • Posts: 225
Re: Menus in QT app not working well when app is lunch via exec()
« Reply #5 on: August 30, 2017, 05:25:56 AM »
I replace xvesa with xorg and no mouse problem but I find the painting very slow.

Offline mbertrand

  • Full Member
  • ***
  • Posts: 225
Re: Menus in QT app not working well when app is lunch via exec()
« Reply #6 on: August 30, 2017, 07: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 ?

Offline mbertrand

  • Full Member
  • ***
  • Posts: 225
Re: Menus in QT app not working well when app is lunch via exec()
« Reply #7 on: August 30, 2017, 07:50:47 AM »
Where can I get source for Xvesa and how to build it on TC?

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: Menus in QT app not working well when app is lunch via exec()
« Reply #8 on: August 30, 2017, 09:44:13 AM »
The source is in tinycore git

Offline mbertrand

  • Full Member
  • ***
  • Posts: 225
Re: Menus in QT app not working well when app is lunch via exec()
« Reply #9 on: August 30, 2017, 10:12:19 AM »
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.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10957
Re: Menus in QT app not working well when app is lunch via exec()
« Reply #10 on: August 30, 2017, 10:25:44 AM »
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.
The only barriers that can stop you are the ones you create yourself.

Offline mbertrand

  • Full Member
  • ***
  • Posts: 225
Re: Menus in QT app not working well when app is lunch via exec()
« Reply #11 on: August 30, 2017, 01: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!

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: Menus in QT app not working well when app is lunch via exec()
« Reply #12 on: August 30, 2017, 01: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
« Last Edit: August 31, 2017, 01:02:27 AM by Juanito »

Offline mbertrand

  • Full Member
  • ***
  • Posts: 225
Re: Menus in QT app not working well when app is lunch via exec()
« Reply #13 on: August 31, 2017, 07: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.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11178
Re: Menus in QT app not working well when app is lunch via exec()
« Reply #14 on: August 31, 2017, 08:01:29 AM »
Hi mbertrand
Quote
/usr/local/bin/libtoolize: line 575: /usr/local/bin/sed: not found
Do you have  sed.tcz  installed?