Results 1 to 8 of 8

Thread: Which widget?

  1. #1
    Join Date
    Jun 2008
    Posts
    33
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Question Which widget?

    Hi,

    I want to build something like QToolWidget but I want to expand more than one pages. And also make it nicer. I mean something else for expanding than big buttons which are in QToolBox. Something like this:

    Which widget may I use?

  2. #2
    Join Date
    Dec 2006
    Posts
    849
    Thanks
    6
    Thanked 163 Times in 151 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Which widget?

    several.
    Combine several using QLayouts (or rather subclasses like QVBoxLayout)

  3. #3
    Join Date
    Jun 2008
    Posts
    33
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Which widget?

    Hmm. But how can I make similar function like these one on the pictures? Which widgets may I combine?

  4. #4
    Join Date
    Dec 2006
    Posts
    849
    Thanks
    6
    Thanked 163 Times in 151 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Which widget?

    I am not familiar with the program your dialog is from.
    But the thigs look like:

    * QToolBox (perhaps)
    * each containing
    QCheckBoxes
    QSpinBoxes
    QRadioButtons
    QGroupBoxes
    QPushButtons
    QLabels

    Take a look at the Qt widget gallery.
    (http://doc.trolltech.com/4.4/gallery-plastique.html)

  5. #5
    Join Date
    Jun 2008
    Posts
    33
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Which widget?

    Ehm, you didnt understand me. I dont want to make exactly what is in the picture. I want to create the system of tabbing the widgets. Something like is QToolBox but I want to expand more than one pages. I want only the expanding system like is on the pictures not the widgets which are exactly there.

  6. #6
    Join Date
    Jan 2006
    Location
    travelling
    Posts
    1,116
    Thanks
    8
    Thanked 127 Times in 121 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Which widget?

    If I remember well the widget box of Qt designer is a tree view (or tree widget which does not make much difference as far as the look and feel is concerned). If you're interested in achieving the same llok for top level items have a look at the source code I'm sure it's not that complicated. Then, use setItemWidget() to display complex widgets instead of simple model items.
    Current Qt projects : QCodeEdit, RotiDeCode

  7. #7
    Join Date
    Jun 2008
    Posts
    33
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Which widget?

    Thank you. I have seen the designer source but you are right it is a tree view. But I want to cover every page by some other widgets like on the second picture. How can I do that?

  8. #8
    Join Date
    Jan 2006
    Location
    travelling
    Posts
    1,116
    Thanks
    8
    Thanked 127 Times in 121 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Which widget?

    QAbstractItemView::setIndexWidget() or QTreeWidget::setItemWidget should do, depending on which approach (model/view or item) you prefer, the later being the most sensible if you want every items to be replaced by widgets.
    Current Qt projects : QCodeEdit, RotiDeCode

Similar Threads

  1. How to Open & Close a Widget ?!!
    By Fatla in forum Qt Programming
    Replies: 6
    Last Post: 13th June 2008, 20:39
  2. Tricky problem with ARGB widget / UpdateLayeredWindow
    By nooky59 in forum Qt Programming
    Replies: 3
    Last Post: 21st February 2008, 10:35
  3. Replies: 3
    Last Post: 17th October 2007, 12:52
  4. Controlling which widget on top layer?
    By JonathanForQT4 in forum Qt Programming
    Replies: 6
    Last Post: 22nd March 2007, 14:27
  5. [Qt 4.1.0] Split a widget on demand
    By Townk in forum Qt Programming
    Replies: 3
    Last Post: 17th February 2006, 14:16

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.