Results 1 to 4 of 4

Thread: activeWindow control problem

  1. #1
    Join Date
    Jun 2008
    Posts
    64
    Thanks
    7
    Qt products
    Qt3 Qt4

    Default activeWindow control problem

    I now have a QWidget, clicking a button in this widget would call another window(A Q3MainWindow).

    I have set the show() and setActiveWindow() to the new window, however I found that the new window don't have the control, it just appears as showing the ui, there's no response with any event of the new window(like clicking buttons).
    Meanwhile I found that the original window still gain the control(which I don't expect it to do so)

    Can anyone tell me what's going on? Or what should I do?

    Qt Code:
    1. NewWin *newWin = new NewWin();
    2. newWin->show();
    3. newWin->setActiveWindow();
    To copy to clipboard, switch view to plain text mode 
    (NewWin inherits Q3MainWindow)


    Thanks

  2. #2
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: activeWindow control problem

    can you show code wher you set up ui for both widget and how you create them?
    it would be nice if this code will be compilable.

  3. #3
    Join Date
    Jun 2008
    Posts
    64
    Thanks
    7
    Qt products
    Qt3 Qt4

    Default Re: activeWindow control problem

    For the NewWin class:
    Qt Code:
    1. NewWin::NewWin(QWidget *parent) : Q3MainWindow(parent)
    2. {
    3. setupUi(this);
    4. init();
    5. }
    To copy to clipboard, switch view to plain text mode 

  4. #4
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: activeWindow control problem

    it's not enough.

Similar Threads

  1. start the mysql service and run commands
    By cbarmpar in forum Qt Programming
    Replies: 17
    Last Post: 14th September 2008, 23:08
  2. Weird problem: multithread QT app kills my linux
    By Ishark in forum Qt Programming
    Replies: 2
    Last Post: 8th August 2008, 09:12
  3. Steps in solving a programming problem?
    By triperzonak in forum General Programming
    Replies: 8
    Last Post: 5th August 2008, 08:47
  4. problem with spinbox control ?
    By vinod in forum Qt Programming
    Replies: 3
    Last Post: 19th April 2006, 19:58
  5. Replies: 6
    Last Post: 3rd February 2006, 09:48

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.