Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. He minimized dialog can not change the geometry?
Forum Updated to NodeBB v4.3 + New Features

He minimized dialog can not change the geometry?

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 648 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • W Offline
    W Offline
    wearilybird
    wrote on last edited by
    #1

    Below are the steps that create the bug:
    1 create a dialog ;
    2 minimize the dialog;
    3 resize the dialog ;
    4 show the dialog ;
    the dialog's size still unchanged .
    Below are the code :
    m_pDialog = new QDialog();
    m_pDialog->resize(100,100);
    m_pDialog->showMinimized();
    QRect rect = m_pDialog->geometry() ;
    m_pDialog->setGeometry(rect.x(),rect.y(),rect.width()*6,rect.height());
    m_pDialog->showNormal();
    so you can see the the dialog the size unchanged .

    1 Reply Last reply
    0
    • IamSumitI Offline
      IamSumitI Offline
      IamSumit
      wrote on last edited by
      #2

      Hi and welcome to devnet..

      [quote author="wearilybird" date="1411453998"]Below are the steps that create the bug:
      1 create a dialog ;
      2 minimize the dialog;
      3 resize the dialog ;
      4 show the dialog ;
      the dialog's size still unchanged .
      Below are the code :
      @
      m_pDialog = new QDialog();
      m_pDialog->resize(100,100);
      m_pDialog->showMinimized();
      QRect rect = m_pDialog->geometry() ;
      m_pDialog->setGeometry(rect.x(),rect.y(),rect.width()*6,rect.height());
      m_pDialog->showNormal();@
      so you can see the the dialog the size unchanged .[/quote]
      i checked your code ..

      The problem is b/w minimize and resizing the dialog; the calculation is changed (b/w step 2 and 3).
      means
      when you call showMinimized() then your dialog goes to status bar.
      then the geometry of m_dialog gets changed instead of (100,100);
      it becomes (116,100)
      so,the calculation will be (1166,100) instead of (1006,100);

      Dialog size is changed but not as expected calculation .

      hope it helps.

      Be Cute

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved