Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Design a button which could resize dynamically
Forum Updated to NodeBB v4.3 + New Features

Design a button which could resize dynamically

Scheduled Pinned Locked Moved QML and Qt Quick
3 Posts 2 Posters 1.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.
  • S Offline
    S Offline
    stereomatching
    wrote on last edited by
    #1

    Studying QML and want to create a button which could shrink and grow dynamically
    Just like the header of QListView

    @
    QStandardItemModel *model = new QStandardItemModel(this);
    model->setHorizontalHeaderLabels(QStringList() = {//labels} );
    QListView *view = new QListView(this);
    @

    Could I make it done with some simple solution?
    Or I better implement some layout mechanisms like
    QHBoxlayout(this is not a trivial mission) by myself?

    1 Reply Last reply
    0
    • D Offline
      D Offline
      dmcr
      wrote on last edited by
      #2

      You're talking of QML.... so why not doing it in QML side?

      dmcr

      1 Reply Last reply
      0
      • S Offline
        S Offline
        stereomatching
        wrote on last edited by
        #3

        @
        You’re talking of QML…. so why not doing it in QML side?
        @

        You are right, I will give a try, still very green about QML

        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