Results 1 to 6 of 6

Thread: is there any way to call / start Qtwidget from win32 application ?

  1. #1
    Join Date
    May 2009
    Posts
    83

    Default is there any way to call / start Qtwidget from win32 application ?

    sorry if i duplicate threads
    is there any way to start Qtwidget window from win32 native gui application
    of from simple win32 c++ application ?

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: is there any way to call / start Qtwidget from win32 application ?

    Unless you really understand your win32 gui event loop, and Qt event loop, don't go on that path.
    Theoretically, you need to link against QtGui.dll, construct a QApplication instance, and call exec() on it - otherwise you wont have any Qt event handing.
    If and how this will play nicely with any other event loops and GUI events in your application is a hard to say, and is very specific to the application it self.
    As I said, don't go there, there be dragons.
    It will probably be easier to port the win32 application to Qt.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  3. #3
    Join Date
    May 2009
    Posts
    83

    Default Re: is there any way to call / start Qtwidget from win32 application ?

    to port to Qt its not an option at all . its legacy code .. allot of code.
    what option do i have beside this ? basically i need to open QMainWindow with QWebkit inside of it .
    then be able to get string back into my win32 application when the QMainWindow done its job .

  4. #4
    Join Date
    Sep 2009
    Location
    Wroclaw, Poland
    Posts
    1,394
    Thanked 342 Times in 324 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: is there any way to call / start Qtwidget from win32 application ?

    You can always create separate Qt-based app to do the specific task and implement communication between those two applications ( sockets, window messages, ... etc )

  5. #5
    Join Date
    May 2009
    Posts
    83

    Default Re: is there any way to call / start Qtwidget from win32 application ?

    you mean inner process communication between the process ?

  6. #6
    Join Date
    Sep 2009
    Location
    Wroclaw, Poland
    Posts
    1,394
    Thanked 342 Times in 324 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: is there any way to call / start Qtwidget from win32 application ?

    Yes, just open the second app as separate process and write/read to/from it - how to do that is up to you. If you need only to start the Qt-webkit window and get a single string when it's finished, I'd probably use simple stdin/out communication (I mean output this string with std::cout or printf, and catch it in your main app). You can use win32 window messages with Qt widgets as well, so use them if you prefer communicating this way. Or use sockets. Or files...
    If porting the app to Qt is not an option, I'd prefer to do this like that, because I agree with high_flyer's previous post.

Similar Threads

  1. Replies: 5
    Last Post: 10th March 2011, 18:16
  2. Replies: 0
    Last Post: 10th April 2009, 15:28
  3. Reparenting widget to Win32 application
    By RThaden in forum Qt Programming
    Replies: 0
    Last Post: 23rd February 2009, 18:21
  4. Porting application from Linux to Win32
    By giusepped in forum Qt Programming
    Replies: 11
    Last Post: 2nd November 2008, 14:23
  5. How to start a phone call
    By Raccoon29 in forum Qt Programming
    Replies: 13
    Last Post: 17th September 2007, 10:53

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.