Results 1 to 6 of 6

Thread: Adding class to MainWindow - using QHBoxLayout ?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Aug 2020
    Posts
    28
    Qt products
    Qt5

    Default Re: Adding class to MainWindow - using QHBoxLayout ?

    In so many words and with usual way to make me feel like an idiot for asking I now have BETTER understanding of widgets.
    Thanks.
    Especially the structure of QMainWindow.
    Simple - it contains three QWidgets and the one I want to work with is the "centralwidget".
    I have NO issues adding to "centralwidget" using QtDesigner GUI, i will be looking into HOW to add generic QWidget in code.
    By generic I mean simple "button" or entire class - such as QDock.
    I'll ask for more help IF I NEED IT.

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,328
    Thanks
    317
    Thanked 871 Times in 858 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Adding class to MainWindow - using QHBoxLayout ?

    In so many words and with usual way to make me feel like an idiot for asking I now have BETTER understanding of widgets.
    Sorry, I don't mean to make you feel like an idiot, but so many times I give you example code, and then you seem to decide you want to do something different that doesn't work. Follow my examples, follow the many, many Qt examples that use QMainWindow, and you won't spend so much time trying to get your UI to work.

    If you are using Qt Creator, look on the Welcome page. You'll see 100 or more projects under Examples, and a bunch of video and other tutorials on the Tutorials page. Many of the QWidget-based examples use QMainWindow as a start and add their UI to the central widget.
    <=== 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.

Similar Threads

  1. show object (scene) in widget in class class mainwindow
    By rimie23 in forum Qt Programming
    Replies: 8
    Last Post: 1st May 2012, 16:15
  2. Replies: 4
    Last Post: 23rd August 2011, 21:53
  3. Replies: 7
    Last Post: 18th August 2011, 14:43
  4. Replies: 11
    Last Post: 25th February 2009, 17:35
  5. class QHBoxLayout
    By csvivek in forum Installation and Deployment
    Replies: 2
    Last Post: 10th April 2008, 07:57

Tags for this Thread

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
  •  
Qt is a trademark of The Qt Company.