Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. International
  3. India
  4. Problem for slow operations in Qt program
Forum Updated to NodeBB v4.3 + New Features

Problem for slow operations in Qt program

Scheduled Pinned Locked Moved India
26 Posts 8 Posters 15.4k 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.
  • A Offline
    A Offline
    andre
    wrote on last edited by
    #21

    Sorry, I am not going to write it all out for you again. You'll have to do some work yourself too.

    1 Reply Last reply
    0
    • M Offline
      M Offline
      maxoreli
      wrote on last edited by
      #22

      Ok ,I'm trying something,and i reply you once time over.
      And about the preview code,is it good?
      [quote author="Andre" date="1309161441"]Sorry, I am not going to write it all out for you again. You'll have to do some work yourself too.
      [/quote]

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

        [quote author="maxoreli" date="1309162036"]Ok ,I'm trying something,and i reply you once time over.
        And about the preview code,is it good?
        [quote author="Andre" date="1309161441"]Sorry, I am not going to write it all out for you again. You'll have to do some work yourself too.
        [/quote]

        [/quote]
        It might be my limited understanding of the English language, but I have no clue what you are asking me here. Could you rephrase, please?

        1 Reply Last reply
        0
        • M Offline
          M Offline
          maxoreli
          wrote on last edited by
          #24

          I ask you if the preview code on QTableWidgetItems is correct for best performance!!!

          [quote author="Andre" date="1309162192"]
          [quote author="maxoreli" date="1309162036"]Ok ,I'm trying something,and i reply you once time over.
          And about the preview code,is it good?
          [quote author="Andre" date="1309161441"]Sorry, I am not going to write it all out for you again. You'll have to do some work yourself too.
          [/quote]

          [/quote]
          It might be my limited understanding of the English language, but I have no clue what you are asking me here. Could you rephrase, please?

          [/quote]

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

            [quote author="maxoreli" date="1309163670"]I ask you if the preview code on QTableWidgetItems is correct for best performance!!!
            [/quote]

            First of all, there is no need to scream at me (three exclamation points). I'm trying to help you, free of charge, but I'll only do that as long as I think it is fun to do so. Getting shouted at does not qualify as fun for me.

            Second, I don't get which part of your code you are referring to with "preview code". Do you mean the FormdP0j_Poj::setupContents() code you posted above?

            In that case: I guess this is not optimal, no. One obvious thing is, is that you are setting the progress dialog label over and over again. Much worse is, that you modify data in the view on every iteration. That means re-draws, and thus slowdowns. You need to look at using something different than QTableWidget for your viewing needs. Why don't you just store your data in a QVector (or something like that), and create your own QAbstractTableModel-based model class on top of that. Then, you can manipulate the data in a very efficient way, and only after processing, you construct a model to use in visualization on top of it. That would lead to only a single UI update, instead of many.

            1 Reply Last reply
            0
            • M Offline
              M Offline
              maxoreli
              wrote on last edited by
              #26

              Excuse me so much for (three exclamation points).I dont want to hurt you.
              Thanks for your forgiveness..

              [quote author="Andre" date="1309164380"][quote author="maxoreli" date="1309163670"]I ask you if the preview code on QTableWidgetItems is correct for best performance!!!
              [/quote]

              First of all, there is no need to scream at me (three exclamation points). I'm trying to help you, free of charge, but I'll only do that as long as I think it is fun to do so. Getting shouted at does not qualify as fun for me.

              Second, I don't get which part of your code you are referring to with "preview code". Do you mean the FormdP0j_Poj::setupContents() code you posted above?

              In that case: I guess this is not optimal, no. One obvious thing is, is that you are setting the progress dialog label over and over again. Much worse is, that you modify data in the view on every iteration. That means re-draws, and thus slowdowns. You need to look at using something different than QTableWidget for your viewing needs. Why don't you just store your data in a QVector (or something like that), and create your own QAbstractTableModel-based model class on top of that. Then, you can manipulate the data in a very efficient way, and only after processing, you construct a model to use in visualization on top of it. That would lead to only a single UI update, instead of many. [/quote]

              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