Results 1 to 3 of 3

Thread: QGridLayout XY position

  1. #1
    Join Date
    Aug 2008
    Posts
    5
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default QGridLayout XY position

    Hi,

    i using Qt 4.3.4.
    how can I compile http://doc.trolltech.com/3.3/t8-main-cpp.html

    QGridLayout *grid = new QGridLayout( this, 2, 2, 10 ); // 2x2, 10 pixel border

    I get some errors like

    qt_mainwindow.cc:33: error: no matching function for call to `QGridLayout::QGrid
    Layout(QWidget*&, int, int, int)'
    i:/Qt/4.3.4/include/QtGui/../../src/gui/kernel/qgridlayout.h:146: note: candidat
    es are: QGridLayout::QGridLayout(const QGridLayout&)
    i:/Qt/4.3.4/include/QtGui/../../src/gui/kernel/qgridlayout.h:69: note:
    QGridLayout::QGridLayout()
    i:/Qt/4.3.4/include/QtGui/../../src/gui/kernel/qgridlayout.h:68: note:
    QGridLayout::QGridLayout(QWidget*)
    make: *** [qt_mainwindow.o] Error 1


    How can I emulate 640x480 pixel mode in GridLayout?
    I confused with the layout from Qt ...
    give it a XY Layout?

    thanks for helping
    Jens

  2. #2
    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: QGridLayout XY position

    Qt 3 and Qt 4 are incompatible. You're using Qt 4 but trying to compile an example from Qt 3. Use the ones provided with Qt 4 instead.
    J-P Nurmi

  3. #3
    Join Date
    Aug 2008
    Posts
    5
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QGridLayout XY position

    Thanks for your Reply,

    but, is there a QXYLayout class like BORLAND Java-Builder?
    So I can use the testfunc(int x, int y, int w, int h) function
    to resize a QPushButton?
    button->setGeometry(x,y,w,h); does not effect.
    But the QDesigner understand XY Layout, if there a way to do this
    per hand?
    I don't will/need *.ui files.

    thanks
    Jens

Similar Threads

  1. QTextEdit restore cursor position
    By artur231 in forum Qt Programming
    Replies: 3
    Last Post: 15th May 2014, 22:02
  2. QGraphicsView: Dialog Position Doubt
    By arjunasd in forum Qt Programming
    Replies: 1
    Last Post: 6th August 2007, 17:48
  3. Qt 3.3 QGridLayout
    By ToddAtWSU in forum Qt Programming
    Replies: 2
    Last Post: 23rd February 2007, 17:40
  4. QGraphicsTextItem: handling cursor position change
    By Angelo Moriconi in forum Qt Programming
    Replies: 2
    Last Post: 30th January 2007, 10:42

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.