tags:

views:

303

answers:

1

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();
A: 

Hi,

your examples aren't Qt code - so did you mixed up sth.?

Please note: Don't mix up Qt code and direct calls to the X11 lib! The most Qt classes need an QApplication object to work.

ciao, Chris

3DH
Hi ciao, thanx for your reply. ok i understand what you are saying.Can you tell me what should be the alternative to xcreatewindow X11 lib call in QT. My purpose is to display images on screen in full screen mode. Do you know QT class to display images coming from some source. Regards
Ummar
Hi,to display images you can use QLabel and its methon setPixmap() - the QPixmap is comparable to pixmaps of X11 - and should be easy to convert your existing pixmaps into QPixmap or QImage.ciao,Chris
3DH