Results 1 to 10 of 10

Thread: xterm -into for embedding

  1. #1
    Join Date
    Mar 2013
    Location
    Hyderabad,Bangalore,India
    Posts
    70
    Thanks
    8
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default xterm -into for embedding

    Hi ,

    I can use this in terminal and terminal will be embeded into the window specified by Wid.
    But I would like to use this in Qt application so that the required application will be embedded into my own window.

    please guide me how..

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: xterm -into for embedding

    If you are looking for a method to get a window's window ID, then have a look at QWidget::winId()

    Cheers,
    _

  3. #3
    Join Date
    Mar 2013
    Location
    Hyderabad,Bangalore,India
    Posts
    70
    Thanks
    8
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: xterm -into for embedding

    No anda_skoa,
    I know how to get a window id.

    we use xtrem -into winid in a terminal so that the terminal is embedding in window of winid

    i want to use

    QApplication()
    {
    ...................
    ................

    xterm -into wind
    }

    so that this application sits in the winid.

  4. #4
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: xterm -into for embedding

    Then you'll have to rephrase your question.
    I assumed you wanted to embed xterm into a window of your application.

    Cheers,
    _

  5. #5
    Join Date
    Mar 2013
    Location
    Hyderabad,Bangalore,India
    Posts
    70
    Thanks
    8
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: xterm -into for embedding

    Can you give an idea how can we embed an application into another using window id of our choice.
    I want this to be done through a program.

    Thanks,

  6. #6
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: xterm -into for embedding

    You only make your request more vague instead of more precise

    Which application is the one having the host window and which application is the one having the window that should be embedded in the host?
    Is your application the frst, the second or neither of the two?

    Cheers,
    _

  7. #7
    Join Date
    Mar 2013
    Location
    Hyderabad,Bangalore,India
    Posts
    70
    Thanks
    8
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: xterm -into for embedding

    Sorry , i confused you.
    lets say i have a main window(QMainWindow) on which i added a 2 widgets in a horizantal layout. lets call it, first application or main application(host)
    now, from my main window i launch some applications(one at a time) by QProcees . this application has to be displayed on my first widget in the layout.----> second application (to be embedded)

    first application (mainwindow) will be running always and provides some window on which the launched application will be embedded ,


    Thanks,

  8. #8
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: xterm -into for embedding

    Most embedding strategies seem to be based on the assumption that the host knows the ID of the window it wants to embed, i.e. this is called "foreign window support" on the platform abstraction plugin level.

    With the window ID at hand, QWindow:fromWinId() should create a QWindow that contains the foreign window. It could then be possible to put this QWindow into a QWidget using QWidget::createWindowContainer().
    It might also be possible to use QWidget::create() with the window ID as its first argument.

    From your example earlier with xterm it seems that there is a second embedding strategy, where the host provides a window ID and the other application uses that to reparent its own window.
    QWidget::winId() and QWindow::winId() should provide such a window ID for that case.

    Cheers,
    _

  9. #9
    Join Date
    Mar 2013
    Location
    Hyderabad,Bangalore,India
    Posts
    70
    Thanks
    8
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: xterm -into for embedding

    I would like to use the second strategy , and i can provide a window id to other application , but how can i make other application sit in the window that i provided id for.
    this is where i need to implement the behaviour of "xterm -into Wid ", i dont know how to do??

  10. #10
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: xterm -into for embedding

    Isn't that the task of the other program?
    You provide the window ID, the other program reparents its window.

    Since you have obviously already tried it, what is the effect you are seeing?

    Cheers,
    _

Similar Threads

  1. QX11EmbedContainer and Xterm
    By brainTech in forum Qt Programming
    Replies: 0
    Last Post: 2nd January 2013, 17:26
  2. Qt creator - Konsole vs Xterm
    By tom1972 in forum Newbie
    Replies: 5
    Last Post: 18th June 2012, 00:34
  3. Open QMainWindow to use xterm window as parent
    By muenalan in forum Qt Programming
    Replies: 0
    Last Post: 1st July 2010, 08:43
  4. QProcess and reading data from xterm
    By sawerset in forum Qt Programming
    Replies: 0
    Last Post: 9th February 2009, 20:48
  5. Replies: 0
    Last Post: 20th November 2008, 15:20

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.