Results 1 to 2 of 2

Thread: Layout positioning problem.

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jul 2010
    Location
    Poland
    Posts
    184
    Thanks
    70
    Thanked 7 Times in 6 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Layout positioning problem.

    Hello!

    I've got very irritating problem with my layout. I need to put it below button which is on top of the window:

    Qt Code:
    1. QPushButton *quitButton = new QPushButton(this);
    2. quitButton->setGeometry(QRect(0,0,25,25));
    3. quitButton->move(207,2);
    4.  
    5. connect(quitButton, SIGNAL(clicked()), this, SLOT(close()));
    6.  
    7. QHBoxLayout *oknoLayout = new QHBoxLayout(this);
    8.  
    9. Wykres *wykres = new Wykres(this);
    10. oknoLayout->addWidget(wykres);
    11.  
    12. oknoLayout->setGeometry(QRect(QPoint(0,40),QPoint(0,320)));
    To copy to clipboard, switch view to plain text mode 

    Layout with widget inside is on top of a button. I need button to be where it is now. QHBoxLayout don't have move(), so any ideas how can I move my layout lower?

    thanks in advance
    best regards
    Tomasz

  2. #2
    Join Date
    Jul 2008
    Location
    Germany
    Posts
    506
    Thanks
    11
    Thanked 76 Times in 74 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Layout positioning problem.

    Hi, put button and layout into a QVBoxLayoutor use a QGridLayout.

    Ginsengelf

Similar Threads

  1. QGraphicsRectItem positioning problem
    By gufeatza in forum Qt Programming
    Replies: 3
    Last Post: 5th September 2009, 00:24
  2. QWidget positioning problem
    By St@n in forum Qt Programming
    Replies: 7
    Last Post: 30th June 2009, 06:56
  3. problem in positioning item in QGraphicsScene()
    By wagmare in forum Qt Programming
    Replies: 4
    Last Post: 8th May 2009, 06:41
  4. Layout problem
    By vijay anandh in forum Qt Programming
    Replies: 1
    Last Post: 12th July 2006, 23:05
  5. QScrollArea problem positioning a QWidget inside
    By Spectator in forum Qt Programming
    Replies: 4
    Last Post: 20th February 2006, 22:59

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.