Results 1 to 7 of 7

Thread: Interacting with a dialog started with a QProcess

  1. #1
    Join Date
    Sep 2009
    Posts
    4
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Question Interacting with a dialog started with a QProcess

    Good Morning,

    The problem is as follows, I am writing a batch converter that uses external programs to convert the files. Converting office binary files to the office xml files. I am converting a lot of excel files that have illegal formulas in them. This causes an assertion dialog to pop up. The assert dialog contains debug information and is modeless.

    I want to be able get my program to automatically press/activate the ignore button.


    I start the program using qprocess. I have tried the Write(), putChar(), and they successfully send the data, but this doesn't affect the assert dialog.

    Any help or direction would be great.

    Thanks!

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Interacting with a dialog started with a QProcess

    Quote Originally Posted by craven View Post
    Good Morning,
    Morning? It's 7pm here

    I want to be able get my program to automatically press/activate the ignore button.
    I start the program using qprocess. I have tried the Write(), putChar(), and they successfully send the data, but this doesn't affect the assert dialog.

    Any help or direction would be great.
    The only solution I can think of and only on Windows is to use the native WinAPI calls - FindWindow() and PostMessage().
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. The following user says thank you to wysota for this useful post:

    craven (30th September 2009)

  4. #3
    Join Date
    Sep 2009
    Posts
    4
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Interacting with a dialog started with a QProcess

    Quote Originally Posted by wysota View Post
    Morning? It's 7pm here

    Just about noon here. :-) The land of Canada.


    The only solution I can think of and only on Windows is to use the native WinAPI calls - FindWindow() and PostMessage().
    Don't have access to those. all I have is the QT tool kits.

    It is a bit of a pain. Thanks though.

  5. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Interacting with a dialog started with a QProcess

    You don't have access to WinAPI on Windows? Hmm... how come?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  6. #5
    Join Date
    Sep 2009
    Posts
    4
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Interacting with a dialog started with a QProcess

    Rather, I haven't installed it. I am good with QT on linux, but this is my first foray into programming on a windows platform.

    I am not even sure how I would go about getting them include.

    May fortune favour the foolish.

  7. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Interacting with a dialog started with a QProcess

    You don't have to install WinAPI... It's the native programming environment on Windows. Qt uses it as well.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  8. #7
    Join Date
    Sep 2009
    Posts
    4
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Interacting with a dialog started with a QProcess

    Thanks, I think I got it figured out. I managed to get the findwindow and postmessage to work. we shall see how this all works.

    I have to run the test, but it should work now.

    Craven.

Similar Threads

  1. Qprocess
    By ricky in forum Newbie
    Replies: 1
    Last Post: 3rd August 2009, 09:32
  2. Issue with Modelless dialog on Mac
    By Satyanarayana Chebrolu in forum Qt Programming
    Replies: 0
    Last Post: 24th February 2009, 10:10
  3. How to detect a QProcess is started
    By cooler123 in forum Qt Programming
    Replies: 9
    Last Post: 26th June 2008, 10:45
  4. Replies: 2
    Last Post: 30th March 2007, 08:10
  5. dialog box
    By Bahar in forum Qt Programming
    Replies: 3
    Last Post: 31st January 2006, 14:52

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.