Results 1 to 18 of 18

Thread: QX11EmbedContainer problem

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2006
    Location
    Mountain View, California
    Posts
    489
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows
    Thanks
    3
    Thanked 74 Times in 54 Posts

    Default Re: QX11EmbedContainer problem

    Quote Originally Posted by Martin42 View Post
    It seems you need to wait for the container to appear on screen.
    The client needs the container's X11 window to be embedded into. From your behavior, I'm assuming it isn't being created until the widget is shown for the first time. So either call show() before embedClient(), or embed the client in the showEvent() method.

  2. #2
    Join Date
    Dec 2006
    Posts
    5
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QX11EmbedContainer problem

    show() (immediately) before embedClient() doesn't work, so I will go for the latter.
    Thanks for your help!

    Martin

    Quote Originally Posted by Brandybuck View Post
    The client needs the container's X11 window to be embedded into. From your behavior, I'm assuming it isn't being created until the widget is shown for the first time. So either call show() before embedClient(), or embed the client in the showEvent() method.

  3. #3

    Default Re: QX11EmbedContainer problem

    I have a similiar problem.

    If I use "QProcess" to invoke an external application, how can I get the winId of that application?

  4. #4
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    8
    Thanked 541 Times in 521 Posts

    Default Re: QX11EmbedContainer problem

    You have to iterate through all the windows until you find it.

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

    Default Re: QX11EmbedContainer problem

    Either use X11 calls to get it or ask the process for it. Maybe it has a way of telling you its winId.

  6. #6
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    8
    Thanked 541 Times in 521 Posts

    Default Re: QX11EmbedContainer problem

    Quote Originally Posted by wysota View Post
    Either use X11 calls to get it or ask the process for it. Maybe it has a way of telling you its winId.
    He can use at most the PID of the process.

  7. #7
    Join Date
    Sep 2008
    Location
    Bangalore
    Posts
    659
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    116
    Thanked 42 Times in 41 Posts

    Smile Re: QX11EmbedContainer problem

    Quote Originally Posted by yumiko View Post
    I have a similiar problem.

    If I use "QProcess" to invoke an external application, how can I get the winId of that application?
    this system call works fine after we start the external program by QProcess : xwininfo -root -all | grep ' " Window Title " ' |awk '{print $1}'

    Window title is the running QProcess execution's title

  8. #8
    Join Date
    May 2011
    Posts
    22
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows Maemo/MeeGo

    Default Re: QX11EmbedContainer problem

    I am using the the container for a xEmbed Widget in the same scope and expect the widget to get embedded in the container but i am getting two window not a single window, the code is like this...
    int main(int argc, char*argv[])
    {
    QApplication app(argc,argv)
    QX11EmbedContainer container;
    QX11EmbedWidget window;
    container.show();
    window.embedInto(container.WinID());
    container.embedclient(window.winID());
    int status= app.exec();
    return status;
    }

    Ideally i shud be getting only a single window but i am getting two separate window.

    What could be the problem????????

Similar Threads

  1. QTimer problem ... it runs but never triggs
    By yellowmat in forum Newbie
    Replies: 4
    Last Post: 4th July 2006, 13:54
  2. Grid Layout Problem
    By Seema Rao in forum Qt Programming
    Replies: 2
    Last Post: 4th May 2006, 13:45
  3. Problem with bitBlt
    By yellowmat in forum Newbie
    Replies: 1
    Last Post: 5th April 2006, 15:08
  4. fftw problem
    By lordy in forum General Programming
    Replies: 1
    Last Post: 16th March 2006, 22:36
  5. Replies: 16
    Last Post: 7th March 2006, 16:57

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.