Results 1 to 4 of 4

Thread: Subclassing QuickItem

  1. #1
    Join Date
    Apr 2009
    Posts
    206
    Thanks
    34
    Thanked 2 Times in 2 Posts

    Default Subclassing QuickItem

    Hello friends,

    does anybody out there subclass quickitem class? I would like to create custom QQuickItem. For example a combobox with a Tabwidget.

    What are the main steps? Are any Documentaation on subclassing QuickItem?

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Subclassing QuickItem

    Can't really imagine how a combobox with a tabwidget would look like, but could you not just aggregate those two controls into one?

    Cheers,
    _

  3. #3
    Join Date
    Apr 2009
    Posts
    206
    Thanks
    34
    Thanked 2 Times in 2 Posts

    Default Re: Subclassing QuickItem

    I mean a combobox and a tabwidget in a vertical layout. Depending on combo index changing the content on the tabwidget has to be also changed.
    I would like to make this on c++ side due to performace aspects. I have seen some examples on how to create custom drawing in which qquickpainted item was subclassed. But my focus is how can I put standard elements like qbutton, qcombobox, qtabwidget etc together and make it a custom control which
    I can provide to qml as an item. That s it.

  4. #4
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Subclassing QuickItem

    What kind of performance do you expect to gain by wiring the combobox's current index property to the tab widget's?
    In QML that is a property binding so the composite component it probably done in some minutes.

    Reimplementing a combo box and a tab widget with all their functionality it more likely in the range of one or more months.

    Cheers,
    _

Similar Threads

  1. Subclassing QLabel
    By Ishtar_UK in forum Newbie
    Replies: 6
    Last Post: 18th May 2011, 21:55
  2. Subclassing QNetworkReply
    By piotr.dobrogost in forum Qt Programming
    Replies: 6
    Last Post: 19th December 2010, 08:42
  3. Subclassing QStandardItem
    By aLiNuSh in forum Newbie
    Replies: 4
    Last Post: 5th April 2007, 20:00
  4. subclassing headerview 2
    By TheM in forum Qt Programming
    Replies: 1
    Last Post: 26th February 2007, 18:54
  5. Subclassing
    By joseph in forum Newbie
    Replies: 1
    Last Post: 25th February 2006, 14:06

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.