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. QGridLayout::addMultiCellWidget analog in Qt 5.7 ?

QGridLayout::addMultiCellWidget analog in Qt 5.7 ?

Scheduled Pinned Locked Moved Solved General and Desktop
10 Posts 3 Posters 3.1k Views
  • 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.
  • P Offline
    P Offline
    poshichek
    wrote on last edited by poshichek
    #1

    Hi all,

    I have very old source code that use , I guess , Qt 3 . I want to port it to Qt 5.7 .
    Compiling it with Qt Creator I see lots of errors:

     'class QGridLayout' has no member named 'addMultiCellWidget'
      layout->addMultiCellWidget(w.c, 0, 0, 1, 1);
              ^
    

    Have no clue how to port it to modern version of Qt .
    Thanks for any suggestions .

    K 1 Reply Last reply
    0
    • P poshichek

      Hi all,

      I have very old source code that use , I guess , Qt 3 . I want to port it to Qt 5.7 .
      Compiling it with Qt Creator I see lots of errors:

       'class QGridLayout' has no member named 'addMultiCellWidget'
        layout->addMultiCellWidget(w.c, 0, 0, 1, 1);
                ^
      

      Have no clue how to port it to modern version of Qt .
      Thanks for any suggestions .

      K Offline
      K Offline
      koahnig
      wrote on last edited by
      #2

      @poshichek

      You might be correct that the code originates from Qt3. At least Qt 4.8 has a note for "addMultiCellWidget" in there for compatibility. There is a note to use addWidget
      Note, this documentation is for Qt4.8 and not Qt5 yet. However, the same routine is given also in Qt5 addWidget.

      Applications written for Qt4 can be compiled and linked most of the time Qt5. Only few adaptations are required.

      I have never worked with Qt3. Therefore, I do not know what further problems you are facing. However, I know that there have been significantly more changes from Qt3 to Qt4 than for Qt4 to Qt5.

      Vote the answer(s) that helped you to solve your issue(s)

      1 Reply Last reply
      2
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi,

        To add to @koahnig you have the:

        1. Porting overview page
        2. Porting to Qt 4 page

        that will help port your application.

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        2
        • P Offline
          P Offline
          poshichek
          wrote on last edited by
          #4

          Thank you guys for your response.
          @koahnig
          Your advice did the job and with few other minor changes the app is compiled now ... Now I'm going to make it work :-)

          BTW I don't have such an option "Mark topic as solved" in tools menu , so moderators , please, do it for me .

          K 1 Reply Last reply
          0
          • P poshichek

            Thank you guys for your response.
            @koahnig
            Your advice did the job and with few other minor changes the app is compiled now ... Now I'm going to make it work :-)

            BTW I don't have such an option "Mark topic as solved" in tools menu , so moderators , please, do it for me .

            K Offline
            K Offline
            koahnig
            wrote on last edited by
            #5

            @poshichek

            Good luck for migration from older Qt version.

            Not sure why you cannot mark it as solved. However, I cannot set it to solved either.

            Vote the answer(s) that helped you to solve your issue(s)

            1 Reply Last reply
            0
            • P Offline
              P Offline
              poshichek
              wrote on last edited by
              #6

              @koahnig

              Thanks .
              Additional issue was re-ordering parameters in all calls to addWidget method. It's already done and original layout shows up on application run .

              K 1 Reply Last reply
              1
              • P poshichek

                @koahnig

                Thanks .
                Additional issue was re-ordering parameters in all calls to addWidget method. It's already done and original layout shows up on application run .

                K Offline
                K Offline
                koahnig
                wrote on last edited by
                #7

                @poshichek

                There is an on-going discussion in the moderator's part. The platform allows to "Ask question" or to discuss ("Submit"). The problem is in what is default. When a question has been as asked, everybody answering will see "ask a question" for submit, which is really confusing, because they are actually answering.

                The other option is to have discussions as default and everybody sees "Submit", but the "Mask as Solved" vanishes.

                In order to mark discussions as "Solved" go to "Topic Tools" and press "Ask as question". Open "Topic Tools" again and now you should see "Mark as Solved" to press.

                Vote the answer(s) that helped you to solve your issue(s)

                1 Reply Last reply
                1
                • P Offline
                  P Offline
                  poshichek
                  wrote on last edited by
                  #8

                  @koahnig

                  Now in my Topic Tools I see an option "Mark as Unsolved" . I think I'll create new test thread to exercise in using Mark as Solved feature .

                  K 1 Reply Last reply
                  0
                  • P poshichek

                    @koahnig

                    Now in my Topic Tools I see an option "Mark as Unsolved" . I think I'll create new test thread to exercise in using Mark as Solved feature .

                    K Offline
                    K Offline
                    koahnig
                    wrote on last edited by
                    #9

                    @poshichek

                    Initially you had in "Topic Tools" as last entry "ask as question". I had changed the status of your thread there. Therefore, you see "Mark as unsolved", since I could activate the "mark as solved" status then as well. Now you see "Mark as normal topic" at the end. There is the key for switching forth and back.

                    Vote the answer(s) that helped you to solve your issue(s)

                    1 Reply Last reply
                    1
                    • P Offline
                      P Offline
                      poshichek
                      wrote on last edited by
                      #10

                      @koahnig
                      Thanks, this problem is solved now .

                      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