Results 1 to 6 of 6

Thread: QT3/QT4 Interaction Issue

  1. #1
    Join Date
    Aug 2011
    Location
    The Internet
    Posts
    29
    Thanks
    5
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default QT3/QT4 Interaction Issue

    I currently have a QT 3.3.6 application (yeah i know old) that needs to have the capability of opening up a QT 4.7 application. The issue is the QT 4.7 application is minimize to the QSystemTrayIcon when I'm tryign to do so. Currently the QT3 application can open up the QT4 application but there is no GUI and it's just a gray box. Any ideas?

  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: QT3/QT4 Interaction Issue

    Can you show us some relevant code?
    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. #3
    Join Date
    Aug 2011
    Location
    The Internet
    Posts
    29
    Thanks
    5
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QT3/QT4 Interaction Issue

    This is essentially my main code (example from system tray)
    Qt Code:
    1. #include <QtGui>
    2.  
    3. #include "window.h"
    4.  
    5. int main(int argc, char *argv[])
    6. {
    7. Q_INIT_RESOURCE(systray);
    8.  
    9. QApplication app(argc, argv);
    10.  
    11. if (!QSystemTrayIcon::isSystemTrayAvailable()) {
    12. QMessageBox::critical(0, QObject::tr("Systray"),
    13. QObject::tr("I couldn't detect any system tray "
    14. "on this system."));
    15. return 1;
    16. }
    17. QApplication::setQuitOnLastWindowClosed(false);
    18.  
    19. Window window;
    20. window.show();
    21. return app.exec();
    22. }
    To copy to clipboard, switch view to plain text mode 

    My QT 3.3 code simply should open the QT 4.7 application with the double click of a button. I don't know what to do there but currently I am calling a windows' show window function.

    Qt Code:
    1. HWND hwnd;
    2. ShowWindow(hwnd, SW_SHOW);
    To copy to clipboard, switch view to plain text mode 

    The problem is QT is currently hiding the GUI and windows is showing it when it's not there.

  4. #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: QT3/QT4 Interaction Issue

    I don't see any code related to opening a Qt4 application in what you posted.
    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.


  5. #5
    Join Date
    Aug 2011
    Location
    The Internet
    Posts
    29
    Thanks
    5
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QT3/QT4 Interaction Issue

    that's the problem. How can I open a QT4 application within a QT3 application? I don't think it's possible to send a signal. I need a way to open it as well as let Qt4 know that it needs to show its GUI.

  6. #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: QT3/QT4 Interaction Issue

    If the application is not started then you don't have anyone to send signals to. Use QProcess to start a new process. If what you expect is to show contents of a window of a Qt4 application inside a Qt3 application then it is not so easy and you have to use platform dependent solutions (like XEmbed on X11 or COM/ActiveX on Windows).
    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.


Similar Threads

  1. Two dynamically created object interaction issue
    By kornicameister in forum Qt Quick
    Replies: 2
    Last Post: 9th September 2011, 11:35
  2. Interaction between QMenuBar and QGLWidget
    By Cucus in forum Qt Programming
    Replies: 1
    Last Post: 19th April 2011, 12:48
  3. QML and C++ interaction
    By cueMan in forum Qt Programming
    Replies: 3
    Last Post: 11th November 2010, 07:30
  4. UI Interaction gone!
    By zgulser in forum Qt Programming
    Replies: 3
    Last Post: 15th May 2010, 12:08
  5. Qt interaction with X11
    By qwakaw in forum Qt Programming
    Replies: 1
    Last Post: 28th December 2008, 20:17

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.