Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. XMoveResizeWindow doesnot work in Qt application
Forum Updated to NodeBB v4.3 + New Features

XMoveResizeWindow doesnot work in Qt application

Scheduled Pinned Locked Moved General and Desktop
4 Posts 3 Posters 2.5k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    aashish.lg
    wrote on last edited by
    #1

    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]

    1 Reply Last reply
    0
    • T Offline
      T Offline
      tobias.hunger
      wrote on last edited by
      #2

      What does this question have to do with Qt?

      1 Reply Last reply
      0
      • R Offline
        R Offline
        rich
        wrote on last edited by
        #3

        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.

        1 Reply Last reply
        0
        • A Offline
          A Offline
          aashish.lg
          wrote on last edited by
          #4

          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.

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved