Results 1 to 20 of 23

Thread: Embed an external application to the widget

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,373
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    3
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: Embed an external application to the widget

    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.


  2. #2
    Join Date
    Oct 2010
    Location
    Germany
    Posts
    8
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    2

    Default Re: Embed an external application to the widget

    Yeah, but I mean the wid from the external application, not my own widget.

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

    Default Re: Embed an external application to the widget

    Just run xterm with "-into X" where X is the winId returned by the window you wish to embed xterm into.
    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.


  4. #4
    Join Date
    Oct 2010
    Location
    Germany
    Posts
    8
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    2

    Default Re: Embed an external application to the widget

    I tried exactly this, but xterm opens in a separate window.

    edit:
    Here's some code:
    Shell::Shell(QWidget *parent)
    : QDockWidget(parent)
    {
    setObjectName("Shell");
    setWindowTitle("Shell");

    QWidget *widget=new QWidget(this);
    setWidget(widget);

    process=new QProcess(this);
    process->start("xterm -into "+QString((int)widget->winId()));
    widget->show();
    }
    edit2:
    I made a screenshot for you, so you can understand what I am trying to achieve:
    Attached Images Attached Images
    Last edited by leenxkewl; 14th October 2010 at 16:15.

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

    Default Re: Embed an external application to the widget

    It fails because your QString "cast" fails. Look that there is no QString constructor taking a sole int as a parameter.
    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. The following user says thank you to wysota for this useful post:

    leenxkewl (14th October 2010)

  7. #6
    Join Date
    Oct 2010
    Location
    Germany
    Posts
    8
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    2

    Default Re: Embed an external application to the widget

    Oh hehe, sorry fur bugging you. Anyways, isn't there a solution to implement any foreign window?
    Attached Images Attached Images
    Last edited by leenxkewl; 14th October 2010 at 17:08.

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

    Default Re: Embed an external application to the widget

    As far as I know, there is no such solution.
    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. Q3ScrollView resists to scroll down to the garbage bin
    By sivrisinek in forum Qt Programming
    Replies: 0
    Last Post: 5th February 2009, 17:50
  2. shared vs static
    By alisami in forum Installation and Deployment
    Replies: 3
    Last Post: 4th October 2008, 13:04
  3. Replies: 16
    Last Post: 23rd May 2008, 10:12
  4. Link Errors
    By magikalpnoi in forum Qt Programming
    Replies: 5
    Last Post: 25th September 2006, 22:04
  5. Replies: 1
    Last Post: 14th June 2006, 14:36

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
  •  
Qt is a trademark of The Qt Company.