OS2 World Community Forum

OS/2, eCS & ArcaOS - Technical => Applications => Topic started by: Martin Iturbide on June 15, 2016, 07:55:11 pm

Title: Qt Apps showing the Command Line. (QEdit and Taskbar)
Post by: Martin Iturbide on June 15, 2016, 07:55:11 pm
Hi

I have an issue with some Qt applications that are graphical, but loads the command line.
For example, I'm attaching the picture of Tea that is workiing fine and QEdit that is showing a command line.

I don't know if it is a way of how the Qt application is compiled or something in the settings of my machine.

I also have this issue with Taskbar.

Regards
Title: Re: Qt Apps showing the Command Line. (QEdit and Taskbar)
Post by: Dave Yeo on June 16, 2016, 03:44:03 am
It's probably how it is compiled or linked. You can use exehdr to change it.
exehdr /PMTYPE:PM foo.exe
Title: Re: Qt Apps showing the Command Line. (QEdit and Taskbar)
Post by: Martin Iturbide on June 16, 2016, 05:05:51 am
Thanks.

EXEHDR did the trick to change the app to be recognized as PM, but if I call it from the command prompt.
If I call it from the desktop it still opens the command line, maybe it is something that got stored on the INIs about that program.

I will keep testing it.

Regards
Title: Re: Qt Apps showing the Command Line. (QEdit and Taskbar)
Post by: Dave Yeo on June 16, 2016, 04:33:52 pm
Perhaps the wrong exehdr option. The choices are
/PMTYPE:(PM | VIO | NOVIO | WINDOWAPI | WINDOWCOMPAT | NOTWINDOWCOMPAT)
Title: Re: Qt Apps showing the Command Line. (QEdit and Taskbar)
Post by: Martin Iturbide on June 16, 2016, 05:58:47 pm
Hi

No, I already tried with /PMTYPE: PM, WINDOWAPI and WINDOWCOMPAT and when I double click it it shows the command line.
The settings of qedit.exe are now showing fine, like a normal PM applications.

About running it on the command line, I just noticed that the command line get stucked, qedit runs fine, but it is not like a normal PM app (like e.exe) than when you run it the command line goes away until you close the program.

Regards
Title: Re: Qt Apps showing the Command Line. (QEdit and Taskbar)
Post by: Dave Yeo on June 17, 2016, 03:06:36 am
I guess it needs some code right after main(), something like
Code: [Select]
#if defined(XP_OS2)
#define INCL_BASE
#define INCL_PM
#include <os2.h>
#endif
...
void main(int argc, char*argv[]) /* type might not be void */
...
#ifdef __OS2__
      // Morph from VIO to PM
      PPIB ppib;
      PTIB ptib;
      DosGetInfoBlocks(&ptib, &ppib);
      ppib->pib_ultype = 3;
#endif

Or a DEF file, IIRC having a line such as
Code: [Select]
NAME qedit WINDOWAPI

I may have mis-remembered some of the above so any real programers want to chime in?
Title: Re: Qt Apps showing the Command Line. (QEdit and Taskbar)
Post by: TeLLie on June 17, 2016, 08:42:43 pm
Hi All,

I have rebuild the app, please test it....
Title: Re: Qt Apps showing the Command Line. (QEdit and Taskbar)
Post by: Martin Iturbide on June 19, 2016, 04:29:39 pm
Thanks Elbert.

I had downloaded QEdit, replaced the files, erase the shadows and now the command line does not show.
The update to taskbar also removed the command line.

Thank you very much.

Regards
Title: Re: Qt Apps showing the Command Line. (QEdit and Taskbar)
Post by: TeLLie on June 19, 2016, 09:06:50 pm
Hi Martin,

Good that it worked like it should.

But wanted to say: THANKS  "BWW Bitwise Works"  as they helped me out to fixed this,
and they helping me a lot whit all kind of probs i have on dev parts.

 
Title: Re: Qt Apps showing the Command Line. (QEdit and Taskbar)
Post by: Dave Yeo on June 19, 2016, 10:15:34 pm
What was the fix?