Results 1 to 2 of 2

Thread: Create own widget in a right way

  1. #1
    Join Date
    Jun 2020
    Posts
    11
    Thanks
    1
    Qt products
    Qt5
    Platforms
    Windows

    Default Create own widget in a right way

    I have a lame problem again. I would like to create my own widget class which look like this:
    minta.jpg

    And i want to add to a QScrollArea. I tried it somwhow but dont work. i cant add the QLabels on QPushbutton to the most left and right side. When i create my own version and added to QScrollArea I just watched a small black button.. no expanding to my QScrollArea , but yeah i used setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred)... any idea guys?

  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: Create own widget in a right way

    Without showing some code, it will be difficult to say what is wrong. Are you using a horizontal layout to manage the three widgets? Which widget do you want to expand? The one in the middle, all of them? Are they all push buttons? It looks like the one in the middle could be a QTextEdit?

    A screenshot doesn't tell us much. Is that what you see? Is it what you want to see?
    <=== 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. How to create a LCD widget in QML?
    By TheIndependentAquarius in forum Qt Quick
    Replies: 3
    Last Post: 28th October 2013, 09:17
  2. create dock widget from some other widget
    By Onanymous in forum Qt Programming
    Replies: 1
    Last Post: 16th December 2011, 16:22
  3. Create ui from widget
    By Fastman in forum Qt Programming
    Replies: 2
    Last Post: 29th November 2010, 20:53
  4. How to Create child widget behind parent widget?
    By anupamgee in forum Qt Programming
    Replies: 6
    Last Post: 22nd June 2010, 14:03
  5. How to create my own widget
    By jayreddy in forum Qt Programming
    Replies: 4
    Last Post: 30th October 2009, 12:45

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.