Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. International
  3. Persian
  4. آرایه ای از اشیا
Forum Updated to NodeBB v4.3 + New Features

آرایه ای از اشیا

Scheduled Pinned Locked Moved Persian
5 Posts 3 Posters 3.2k 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
    silver
    wrote on last edited by
    #1

    p{direction:rtl; text-align:right}. سلام
    میشه توی Qt آرایه ای از اشیا مثل دکمه ها یا لیبل ها رو داشت؟

    Linus Torvalds –
    Software is like sex: it’s better when it's free.

    1 Reply Last reply
    0
    • B Offline
      B Offline
      bs994
      wrote on last edited by
      #2

      p{direction:rtl; text-align:right}. آره
      من یه بار این کارو کردم جواب داد

      p{direction:ltr; text-align:left}. QLabel* label_arr[size];

      p{direction:rtl; text-align:right}. بعد برای استفاده :

      p{direction:ltr; text-align:left}. label_arr[ 1 ]->setText("label array");

      Real Eyes Realize Real Lies .

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

        p{direction:rtl; text-align:right}. میتونی از QList استفاده کنی

        http://qt-project.org/doc/qt-4.8/QList.html

        1 Reply Last reply
        0
        • S Offline
          S Offline
          silver
          wrote on last edited by
          #4

          p{direction:rtl; text-align:right}. ممنون مصطفی جان

          p{direction:rtl; text-align:right}. محسن جان یعنی باید این طوری استفاده کنم؟

          @ QList<QPushButton *> btnList;@

          p{direction:rtl; text-align:right}. ======================================
          مزیتش نسبت به روشی که مصطفی گفت چیه؟ آخه اون خیلی ساده تره

          توی designer هم میشه این کار رو کرد؟

          Linus Torvalds –
          Software is like sex: it’s better when it's free.

          1 Reply Last reply
          0
          • M Offline
            M Offline
            mohsen
            wrote on last edited by
            #5

            p{direction:rtl; text-align: right}. روش مصطفی هم درسته ولی یک آرایه pre-allocate شده هست. QList به شما این امکان رو میده که بهش اضافه یا ازش کم کنی یا حتی بین رکورد ها یک رکورد جدید ایجاد کنی. در عین حال خیلی سریع عمل میکنه.

            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