Results 1 to 4 of 4

Thread: the pop up location of dialog

  1. #1
    Join Date
    Jul 2008
    Location
    Munich
    Posts
    73
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: the pop up location of dialog

    I have a mainwindow opened, and one child dialog (QFileDialog::getOpenFileName) is opened from its sub-dialog. Since I have two monitors, each time, after I open the child dialog once in monitor1, then I drag the sub-dialog to monitor2, if I open the child dialog, it pops up in monitor1 still (mainwindow always stays in monitor1).

    I am confused, I wrote the code (in sub-dialog class):
    Qt Code:
    1. void sub-dialog::on_pushButton_load_clicked()
    2. {
    3. QString sFile = QFileDialog::getOpenFileName(this, tr("Open file"), sLoadDir, tr("output (*.txt);;All files (*.*)") );
    4. ...
    5. }
    To copy to clipboard, switch view to plain text mode 

    The location of pop up should be the same with its parent dialog, which here is the sub-dialog. Anything wrong?

    Thanks in advance~


    Added after 8 minutes:


    Eventhough I move the mainwindow to monitor2, the pop up location is still in monitor1.
    Last edited by stella1016; 14th June 2011 at 10:22.

  2. #2
    Join Date
    Jul 2008
    Location
    Munich
    Posts
    73
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: the pop up location of dialog

    I think this a bug from qt 4.5.2 (even qt 4.6.0). Example of qt has the same problem.
    Last edited by stella1016; 14th June 2011 at 14:59.

  3. #3
    Join Date
    Aug 2008
    Posts
    45
    Thanks
    1
    Thanked 6 Times in 6 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: the pop up location of dialog

    Have you checked that you don't have some external software that repositions dialogs to a certain monitor? At least NVIDIA's Nview can do that.

  4. #4
    Join Date
    Jul 2008
    Location
    Munich
    Posts
    73
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: the pop up location of dialog

    Quote Originally Posted by joyer83 View Post
    Have you checked that you don't have some external software that repositions dialogs to a certain monitor? At least NVIDIA's Nview can do that.
    No, I didn't do any reposition.

    This really depends on in which monitor I open the child dialog. It will stick to that monitor, no matter I move the mainwindow to the other monitor or the parent-dialog to the other monitor.

Similar Threads

  1. QDomDocument DTD location
    By Rayven in forum Qt Programming
    Replies: 6
    Last Post: 15th January 2011, 06:30
  2. HLine location
    By czlowiekcien in forum Newbie
    Replies: 2
    Last Post: 4th June 2009, 00:51
  3. how to fix widget location
    By ht1 in forum Qt Programming
    Replies: 3
    Last Post: 22nd November 2007, 07:10
  4. Location of source for Qt
    By will49 in forum Newbie
    Replies: 2
    Last Post: 12th October 2007, 09:30
  5. Location of QGraphicItem!!
    By rachana in forum Qt Programming
    Replies: 2
    Last Post: 2nd February 2007, 21:20

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.