XMoveResizeWindow doesnot work in Qt application



  • Hi,

    I am very new to xlib programming. I wrote one sample Qt UI project inside that I am just resizing my main app window using Xlib API. But it is failing to resize my window.
    I am working on Ubuntu.

    Code snippet:-

    @
    Display *display = XOpenDisplay(NULL);
    int iRet = XMoveResizeWindow(display, w.winId(), 20,20,100,100);
    @

    iret is coming as 1 .

    Regards
    Ashish

    [EDIT: code formatting, please wrap in @-tags, Volker]


  • Moderators

    What does this question have to do with Qt?



  • From the code you posted you're trying to mix XLib and Qt - Don't. Your QWidget seems to be called w, so simply call the resize method on it.



  • Hi,

    Thanks a lot for your suggestion. I can call Qt ResizeGeometry() to resize the window, but my problem is that inside the Qt code I need to change the parent of widegt to some other external running application. and since that application is not being developed using Qt so that the window of that application will not inherit from QWidget and for changing the parent using Qt , the parent window must be QWidget *.

    I have to use XReparentWindow() inside Qt code.
    under windows I have achieved this using SetParent API and it works fine.

    Can we not do this stuff in Linux.
    Please advice.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.