How to display a Dialog on window created using XCreateWindow in QT 4.5.2

Posted by Ummar on Stack Overflow See other posts from Stack Overflow or by Ummar
Published on 2009-09-11T07:32:09Z Indexed on 2010/03/25 10:03 UTC
Read the original article Hit count: 286

Filed under:
|

I am doing work on project. In which I have developed a full size screen displaying images using XCreateWindow. Now I want to display a dialog on this screen. I have created a QDialog it does'nt show on the full size screen but it is displayed on screen when it is not full size. Any Help. My code for creating screen and dialogbox is as follows

XSetWindowAttributes attribs;
XClassHint *classhints;
XSizeHints *sizehints;
int wndwidth, wndheight;
long input_mask, ic_input_mask;
XEvent xevent;

wndwidth = fullscreen ? WidthOfScreen(screen) : width;
wndheight = fullscreen ? HeightOfScreen(screen) : height;

attribs.background_pixel = BlackPixelOfScreen(screen);

attribs.backing_store = ownbackstore ? NotUseful : Always;

attribs.override_redirect = fullscreen;

wnd = XCreateWindow(display, RootWindowOfScreen(screen), 0, 0, wndwidth,
wndheight, 0, CopyFromParent, InputOutput, CopyFromParent,
CWBackPixel | CWBackingStore | CWOverrideRedirect, &attribs);


XRaiseWindow(display, wnd);

//QDialog I want to show on wnd(XCreateWindow)
ToolbarDialog *objToolbarDialog= new ToolbarDialog();
objToolbarDialog->setVisible(true);
objToolbarDialog->showNormal();

© Stack Overflow or respective owner

Related posts about qt4

Related posts about c++