Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Mac-style tree widget selection in windows-based project.
Forum Updated to NodeBB v4.3 + New Features

Mac-style tree widget selection in windows-based project.

Scheduled Pinned Locked Moved General and Desktop
6 Posts 4 Posters 2.7k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mastak128
    wrote on last edited by
    #1

    Hi there!

    I have windows-based project. But I want to implement tree-widget with selection styles as in mac. Something like that
    !http://www1.picturepush.com/photo/a/8505824/img/Anonymous/mac-style-tree-widget.png(mac-style selection in tree widget)!

    In windows item selection doesn't selection occupy whole item rect. Only the right part with indention.
    Can I re-implement such behavior?

    1 Reply Last reply
    0
    • T Offline
      T Offline
      tucnak
      wrote on last edited by
      #2

      You want to use QTreeView or QTreeWidget?

      1 Reply Last reply
      0
      • M Offline
        M Offline
        mastak128
        wrote on last edited by
        #3

        It doesn't depend on. I thought to use QTreeWidget, but If you suggest me solution for QTreeView it will be great.

        1 Reply Last reply
        0
        • M Offline
          M Offline
          mastak128
          wrote on last edited by
          #4

          Up.
          Can anybody help me? Any ideas?
          Thanks

          1 Reply Last reply
          0
          • G Offline
            G Offline
            goetz
            wrote on last edited by
            #5

            Maybe you could write your own item delegate an reimplement the paint methods there. I would start with subclassing [[Doc:QStyledItemDelegate]].

            @tucnac:
            Whether it's a view or a widget is irrelevant as the latter just uses the former and adds a convenience model and some additional methods.

            http://www.catb.org/~esr/faqs/smart-questions.html

            1 Reply Last reply
            0
            • A Offline
              A Offline
              andre
              wrote on last edited by
              #6

              A style sheet should do the trick, I think.

              1 Reply Last reply
              0

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved