Results 1 to 5 of 5

Thread: list of client windows

  1. #1
    Join Date
    Dec 2006
    Posts
    123
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt/Embedded
    Platforms
    Unix/X11

    Unhappy list of client windows

    hi...

    i have a QWSServer application and some client applications. can anyone say me how to obtain the list of the client windows using the following function:

    const QPtrList<QWSWindow> & QWSServer::clientWindows ()

    i tried but could not get it work.

    thanks in advance..

    saravanan.....

  2. #2
    Join Date
    Oct 2006
    Posts
    60
    Thanks
    9
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11

    Default Re: list of client windows

    Not positive but I believe this should work:

    Qt Code:
    1. const QPtrList<QWSWindow> windowList;
    2. QWSServer server;
    3. windowList = server.clientWindows();
    To copy to clipboard, switch view to plain text mode 

    mAx

  3. #3
    Join Date
    Dec 2006
    Posts
    123
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: list of client windows

    hi...
    thank for your suggesstion. but still a bit clarifications.
    in the main.cpp of my application i had written as follows:

    int main( int argc, char **argv )
    {
    QApplication a( argc, argv ,QApplication::GuiServer);

    keyclass w;
    //w.setWFlags(Qt::WStyle_Customize);
    //w.setWFlags(Qt::WStyle_Tool);
    a.setMainWidget( &w );
    w.show();
    a.connect( &a, SIGNAL( lastWindowClosed() ), &a, SLOT( quit() ) );
    return a.exec();
    }.


    so this is a server application right....? in that case i had altered the code as follows:

    qwsServer->openKeyboard();
    const QPtrList<QWSWindow> windowList;
    windowList = qwsServer.clientWindows(); ...

    is this correct...? else how...?

    also when i compiled : there were errors as: "request for member ‘clientWindows’ in ‘qwsServer’, which is of non-class type ‘QWSServer*’".

    so trying to find some other way.

    if you have any more suggestions please let me know.

    saravanan

  4. #4
    Join Date
    Dec 2006
    Posts
    123
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: list of client windows

    opps soory i did not remove the statement"qwsServer->openKeyboard();"

  5. #5
    Join Date
    Dec 2006
    Posts
    123
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: list of client windows

    hi ...

    can anyone provide me solution to get the id of client windows. i had written as the following:
    int winid=0;
    QPtrList<QWSWindow> windowList;
    windowList = qwsServer->clientWindows();
    QWSWindow *ab;
    ab=windowList.first();
    printf("\n THE WINDOW ID:%x\n",ab->winId());

    but it returns the id of the parent window...

    can anyone say me where i'm going wrong....?is there anything wrong in my code...? is my main(in the earlier post) correct..? if please let me know what is wrong...

    thanks in advance,

    saravanan

Similar Threads

  1. converting unix exe to windows binary
    By deekayt in forum General Programming
    Replies: 2
    Last Post: 17th September 2006, 01:00
  2. MDI windows without QWorkspace
    By Big Duck in forum Newbie
    Replies: 2
    Last Post: 16th June 2006, 17:15
  3. Fix: QT app won't run under Oracle Standard Client install
    By GreyGeek in forum General Discussion
    Replies: 0
    Last Post: 12th May 2006, 18:20
  4. synching client readings to server output
    By OnionRingOfDoom in forum Qt Programming
    Replies: 14
    Last Post: 28th January 2006, 18:15
  5. Qt and windows vista
    By munna in forum General Discussion
    Replies: 8
    Last Post: 11th January 2006, 22:33

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.