Author Topic: Qt Apps showing the Command Line. (QEdit and Taskbar)  (Read 6975 times)

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4696
  • Karma: +41/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Qt Apps showing the Command Line. (QEdit and Taskbar)
« 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
« Last Edit: June 15, 2016, 10:59:47 pm by Martin Iturbide »
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4775
  • Karma: +99/-1
    • View Profile
Re: Qt Apps showing the Command Line. (QEdit and Taskbar)
« Reply #1 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

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4696
  • Karma: +41/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: Qt Apps showing the Command Line. (QEdit and Taskbar)
« Reply #2 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
« Last Edit: June 16, 2016, 05:14:17 am by Martin Iturbide »
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4775
  • Karma: +99/-1
    • View Profile
Re: Qt Apps showing the Command Line. (QEdit and Taskbar)
« Reply #3 on: June 16, 2016, 04:33:52 pm »
Perhaps the wrong exehdr option. The choices are
/PMTYPE:(PM | VIO | NOVIO | WINDOWAPI | WINDOWCOMPAT | NOTWINDOWCOMPAT)

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4696
  • Karma: +41/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: Qt Apps showing the Command Line. (QEdit and Taskbar)
« Reply #4 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
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4775
  • Karma: +99/-1
    • View Profile
Re: Qt Apps showing the Command Line. (QEdit and Taskbar)
« Reply #5 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?

TeLLie

  • Full Member
  • ***
  • Posts: 226
  • Karma: +11/-0
    • View Profile
Re: Qt Apps showing the Command Line. (QEdit and Taskbar)
« Reply #6 on: June 17, 2016, 08:42:43 pm »
Hi All,

I have rebuild the app, please test it....

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4696
  • Karma: +41/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: Qt Apps showing the Command Line. (QEdit and Taskbar)
« Reply #7 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
Martin Iturbide
OS2World NewsMaster
... just share the dream.

TeLLie

  • Full Member
  • ***
  • Posts: 226
  • Karma: +11/-0
    • View Profile
Re: Qt Apps showing the Command Line. (QEdit and Taskbar)
« Reply #8 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.

 

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4775
  • Karma: +99/-1
    • View Profile
Re: Qt Apps showing the Command Line. (QEdit and Taskbar)
« Reply #9 on: June 19, 2016, 10:15:34 pm »
What was the fix?