Results 1 to 2 of 2

Thread: QInputDialog shifting its position

  1. #1
    Join Date
    May 2014
    Posts
    1
    Qt products
    Qt5
    Platforms
    MacOS X

    Default QInputDialog shifting its position

    Hi all,
    I wrote a simple code where I ask the user to input some values during a for loop using a QInputDialog.

    Qt Code:
    1. for(i=0;i<3;++i)
    2. {
    3. s = QInputDialog::getText(this,tr("Insert a number"),tr("Input"),QLineEdit::Normal,
    4. NULL,&ok);
    5. if(s!=NULL)
    6. ui->listWidget->addItem(s);
    7. }
    To copy to clipboard, switch view to plain text mode 
    Problem is that after each iteration the Dialog window shifts a bit along the x and y direction. Why ? How can I fix its position ?

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: QInputDialog shifting its position

    Sounds like something the platform's window manager is doing.

    You could try using a QInputDialog instance and calling its move() method before exec().

    Cheers,
    _

Similar Threads

  1. shifting curve up or down
    By oliver_mpt in forum Qwt
    Replies: 3
    Last Post: 26th November 2012, 11:17
  2. Replies: 14
    Last Post: 9th May 2012, 05:43
  3. Bitwise shifting and ORing HexaDecimal Value
    By nagabathula in forum Qt Programming
    Replies: 14
    Last Post: 19th November 2010, 07:22
  4. Shifting a QImage up by 1 pixel row
    By MSUdom5 in forum Qt Programming
    Replies: 2
    Last Post: 7th May 2010, 10:25
  5. Byte shifting in C
    By tntcoda in forum General Programming
    Replies: 3
    Last Post: 14th November 2008, 22:40

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.