Results 1 to 1 of 1

Thread: Issue when i open window from mainwindow after the 1st time - it will open very small

  1. #1
    Join Date
    Mar 2018
    Posts
    33
    Thanks
    18
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Issue when i open window from mainwindow after the 1st time - it will open very s

    In my code code attached i have this issues:
    1 - when i open the edit window at 1st time the window will be open right, next time it will open very small?
    (if i make some mistake in my code tell me what is the right procedure to do the job by explain me with some code, thank you)
    2 - I'm trying to reduce the "color-label" to the width of the combobox, i have tried some but with no effect, how i can do it?
    3 - when i try to close the main window by pressing with the mouse on X button, no happen?

    Qt compiler is showed this message after the 1st open:
    QWidget::setLayout: Attempting to set QLayout "" on EditObject "", which already has a layout


    Added after 38 minutes:


    after i used an auxiliary update_val:
    Qt Code:
    1. void EditObject::window_elements_update()
    2. {
    3. ....
    4. if (update_val){
    5. update_val = 0;
    6. setLayout(final_layout);
    7.  
    8. }
    9. else {
    10. layout()->update();
    11. }
    12. }
    To copy to clipboard, switch view to plain text mode 
    and the message "QWidget::setLayout: Attempting to set QLayout "" on EditObject "", which already has a layout" disappeared but the window still small after the 1st open window
    Attached Files Attached Files
    Last edited by andreaQt; 5th October 2020 at 14:57.

Similar Threads

  1. Restore the mainwindow size on last open
    By prabhatjha in forum Newbie
    Replies: 1
    Last Post: 22nd January 2020, 17:22
  2. Replies: 4
    Last Post: 24th December 2016, 14:22
  3. Replies: 0
    Last Post: 9th May 2010, 21:49
  4. Open Dialog from MainWindow.
    By halvors in forum Qt Programming
    Replies: 8
    Last Post: 1st April 2010, 02:09
  5. Open mainwindow
    By cwnelatury in forum Newbie
    Replies: 1
    Last Post: 17th April 2009, 23: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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.