Results 1 to 6 of 6

Thread: Why the bottom of main window covers other widgets?

  1. #1
    Join Date
    Jul 2018
    Posts
    8
    Qt products
    Qt4
    Platforms
    Windows

    Question Why the bottom of main window covers other widgets?

    캡처.PNG
    Why do this happen? I tried to fix the python code manually to remove it, but I can't find it.
    Last edited by sodlqnf123; 4th July 2018 at 05:20.

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Why the bottom of main window covers other widgets?

    Is your widget based on QMainWindow? Have you implemented a class based on QWidget containing a layout and your UI and set it as QMainWindow's "centralWidget"?

    If your class is not based on QMainWindow but on QWidget or QDialog, have you created a layout for the window with your buttons and line edits laid out inside it?

    What I see in your screenshot is what I would expect to see if you were not using a layout or were using it incorrectly.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

  3. #3
    Join Date
    Jul 2018
    Posts
    8
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Why the bottom of main window covers other widgets?

    Capture.PNG

    It looks like this.
    What did I wrong? I have already implemented centralWidget

  4. #4
    Join Date
    Mar 2008
    Location
    Kraków, Poland
    Posts
    1,536
    Thanked 284 Times in 279 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Why the bottom of main window covers other widgets?

    centralwidget has no layout.

  5. #5
    Join Date
    Jul 2018
    Posts
    8
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Why the bottom of main window covers other widgets?

    Then do you mean that I have to remove default centralWidget and make another widget that has a specific layout?

  6. #6
    Join Date
    Mar 2008
    Location
    Kraków, Poland
    Posts
    1,536
    Thanked 284 Times in 279 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Why the bottom of main window covers other widgets?

    No, just add layout to centralWidget. Object centralLayout is not layout for centralWidget.

Similar Threads

  1. Changing names of QTabWidget tabs
    By RThaden in forum Qt Programming
    Replies: 7
    Last Post: 29th January 2019, 21:25
  2. How to get a list of file names in a directory?
    By khanhsk in forum Qt Programming
    Replies: 2
    Last Post: 8th February 2012, 02:34
  3. Qt Creator Changing file names in Qt Creator
    By tiredtyrant in forum Qt Tools
    Replies: 1
    Last Post: 19th March 2010, 20:04
  4. moc with same file names?
    By cjhuitt in forum Qt Programming
    Replies: 9
    Last Post: 27th April 2007, 20:36
  5. Reading a unicode names from a file???
    By darpan in forum Qt Programming
    Replies: 7
    Last Post: 3rd May 2006, 17:28

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.