Results 1 to 10 of 10

Thread: How to use the Qt3 Support members in Qt4?

  1. #1
    Join Date
    Dec 2006
    Location
    Bangalore, India
    Posts
    38
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Unhappy How to use the Qt3 Support members in Qt4?

    Hi Folks,

    In my project(Qt4) I'm using
    Qt Code:
    1. void QGridLayout::addColSpacing ( int col, int minsize )
    To copy to clipboard, switch view to plain text mode 
    the above method but I'm getting the following error " 'addColSpacing' : is not a member of 'QGridLayout'. "

    Can any one help me in this regard..!!!
    WINNERS DON`T D DIFFERENT THINGS THEY D THINGS differently.

  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: How to use the Qt3 Support members in Qt4?

    try to use this
    Qt Code:
    1. void QGridLayout::setColumnMinimumWidth ( int column, int minSize )
    To copy to clipboard, switch view to plain text mode 

  3. #3
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: How to use the Qt3 Support members in Qt4?

    You shouldn't use Qt3 support members in new code. Anyway, if you insist, add this to your .pro file:
    Qt Code:
    1. QT += qt3support
    To copy to clipboard, switch view to plain text mode 
    J-P Nurmi

  4. #4
    Join Date
    Dec 2006
    Location
    Bangalore, India
    Posts
    38
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to use the Qt3 Support members in Qt4?

    Yup I got it. Thanks folks...
    But still I'm not meeting my requirement. FYI, Please look into the attachment.

    There you could find collections of "checkboxes" in one side and other side "spinboxes & checkboxes".
    I wanted to reduce the width of the spinboxes. I kept everything in a grid layout and I have tried setColumnMinimumWidth, setRowMinimumHeight, setColSpacing & etc., but nothing works...

    Can any one help in this regard..........?
    Attached Images Attached Images
    WINNERS DON`T D DIFFERENT THINGS THEY D THINGS differently.

  5. #5
    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: How to use the Qt3 Support members in Qt4?

    you can set Size Policy of spinBox to Fixed.

  6. #6
    Join Date
    Dec 2006
    Location
    Bangalore, India
    Posts
    38
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to use the Qt3 Support members in Qt4?

    I tried the following method but I'm getting error( 'QSizePolicy::QSizePolicy' : cannot access private member declared in class 'QSizePolicy' ).

    spnBx->setSizePolicy(QSizePolicy::Fixed)

    How to get this property..???
    WINNERS DON`T D DIFFERENT THINGS THEY D THINGS differently.

  7. #7
    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: How to use the Qt3 Support members in Qt4?

    use this use
    Qt Code:
    1. void QWidget::setSizePolicy ( QSizePolicy::Policy horizontal, QSizePolicy::Policy vertical )
    To copy to clipboard, switch view to plain text mode 

  8. #8
    Join Date
    Dec 2006
    Location
    Bangalore, India
    Posts
    38
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to use the Qt3 Support members in Qt4?

    If you done mine, could you please explain me little more with an example..?
    WINNERS DON`T D DIFFERENT THINGS THEY D THINGS differently.

  9. #9
    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: How to use the Qt3 Support members in Qt4?

    read this
    http://doc.trolltech.com/4.4/qwidget...izePolicy-prop
    in your case, your code should look like
    Qt Code:
    1. spinBox->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
    To copy to clipboard, switch view to plain text mode 

  10. #10
    Join Date
    Dec 2006
    Location
    Bangalore, India
    Posts
    38
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to use the Qt3 Support members in Qt4?

    Yup I got it.................................

    Thanks Spirit,
    WINNERS DON`T D DIFFERENT THINGS THEY D THINGS differently.

Similar Threads

  1. Installation Problem
    By QbelcorT in forum Installation and Deployment
    Replies: 4
    Last Post: 22nd April 2010, 09:04
  2. Qt-4.4.0 installation error in linux
    By babu198649 in forum Installation and Deployment
    Replies: 4
    Last Post: 27th May 2008, 14:35
  3. Access to PostgreSQL DB on a linux server
    By rmagro in forum Qt Programming
    Replies: 28
    Last Post: 13th March 2008, 09:02
  4. Qt 4.4.0 make problem
    By MarkoSan in forum Installation and Deployment
    Replies: 24
    Last Post: 22nd January 2008, 17:58
  5. qt-3.3.8 fail in scratchbox
    By nass in forum Installation and Deployment
    Replies: 0
    Last Post: 25th May 2007, 15:21

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.