Results 1 to 7 of 7

Thread: QLayoutPrivate issue

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Oct 2008
    Posts
    11
    Thanks
    4
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: QLayoutPrivate issue

    I resolved this issue by

    Qt Code:
    1. #include <QtGui/private/qlayout_p.h>
    To copy to clipboard, switch view to plain text mode 

    If this will not work, I'll try your solution.

  2. #2
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QLayoutPrivate issue

    it is bad idea to use Qt's internal code.
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

  3. #3
    Join Date
    Oct 2008
    Posts
    11
    Thanks
    4
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: QLayoutPrivate issue

    Indeed! Thank you.

  4. #4
    Join Date
    May 2011
    Posts
    10
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QLayoutPrivate issue

    I'm trying to do the exact same thing. This thread is rather old, but I would be very happy to know how you solved this. I'm struggling with getting the suggestion from "spirit" to work.

  5. #5
    Join Date
    May 2013
    Location
    Cambridge, UK
    Posts
    2
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11

    Default Re: QLayoutPrivate issue

    You also need to store the widget using addChildWidget(). So the additional functions should look like the following:

    Qt Code:
    1. void FlowLayout::insertItem(int index, QLayoutItem *item)
    2. {
    3. itemList.insert(index, item);
    4. }
    5.  
    6. void FlowLayout::insertWidget(int index, QWidget *widget)
    7. {
    8. addChildWidget(widget);
    9. QWidgetItem *item = new QWidgetItem(widget);
    10. insertItem(index, item);
    11. }
    To copy to clipboard, switch view to plain text mode 

    P.S. this works for me.

Similar Threads

  1. Replies: 1
    Last Post: 28th October 2008, 16:29
  2. deployment issue?
    By triperzonak in forum Installation and Deployment
    Replies: 1
    Last Post: 7th October 2008, 08:59
  3. qt4.4 pc specs requirements or qt3 support issue?
    By triperzonak in forum Installation and Deployment
    Replies: 0
    Last Post: 9th August 2008, 02:40
  4. qt3 to qt4 - uic issue
    By hvengel in forum Qt Programming
    Replies: 10
    Last Post: 4th March 2007, 02:59
  5. Replies: 5
    Last Post: 22nd September 2006, 08:04

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.