Results 1 to 7 of 7

Thread: prolem with threadedfortuneserver using QMainWindow instread dialog

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Dec 2013
    Posts
    4
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default prolem with threadedfortuneserver using QMainWindow instread dialog

    Hi I am new qt programming, I tried to use threadedfortune example it works fine but, when I replace the dialog class by QMainWindow (ui) the program doesn't work?
    any idea I did not change the code of fortuneserver.* and fortunethread.*, I just repace dialog.* by ui.*
    when I run it, it seems connected but not responding
    any help thanks.


    void ui::runserver()
    {
    QHostAddress hostadd("127.0.0.1");
    if (!server.listen(hostadd,20000)) {
    cout<<"Threaded Fortune ServerUnable to start the server: %1."<<server.errorString().toStdString()<<endl;
    close();
    return;
    }

    cout<<server.serverAddress().toString().toStdStrin g()<<" at port "<<server.serverPort()<<endl;
    }
    Attached Files Attached Files
    • File Type: cpp ui.cpp (847 Bytes, 5 views)
    • File Type: h ui.h (822 Bytes, 3 views)

Similar Threads

  1. Replies: 4
    Last Post: 25th August 2014, 18:05
  2. Replies: 3
    Last Post: 13th November 2011, 08:12
  3. How to close QMainWindow and open login dialog
    By keeyias in forum Qt Programming
    Replies: 3
    Last Post: 15th October 2009, 12:33
  4. Replies: 9
    Last Post: 13th August 2008, 18:07
  5. Modal dialog in QMainWindow's event() function
    By tanminh in forum Qt Programming
    Replies: 1
    Last Post: 22nd June 2007, 09:46

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
  •  
Qt is a trademark of The Qt Company.