Navigation

    Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    1. Home
    2. Tags
    3. qhboxlayout
    Log in to post

    • UNSOLVED QGroupBox does not fit into layouts
      General and Desktop • qgroupbox qvboxlayout qhboxlayout qt5.6.1 • • pauledd  

      7
      0
      Votes
      7
      Posts
      3345
      Views

      @SGaist thank you, I took QFormLayout into account. @VRonin also thank you! I can not believe that it would take so much code to get this done... After starting over and over again I came up with this: GeneralTab::GeneralTab(QWidget *parent) :QWidget(parent) { QLineEdit *lineEdit = new QLineEdit("/dev/video0"); QGroupBox *groupBox = new QGroupBox("Settings",this); groupBox->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding); QFormLayout *formLayout = new QFormLayout(groupBox); formLayout->addRow("Video Device: ",lineEdit); } and this looks exactly what I wanted, two widgets with a nice group box border sized to minimal space usage: https://pauledd.files.wordpress.com/2016/08/pat4.png I dont really know If this code is correct or might produce trouble but at least I dont find any errors at the moment.
    • UNSOLVED Align buttons on the right side of QHBoxLayout.
      General and Desktop • qlayout qhboxlayout • • tokafr  

      5
      0
      Votes
      5
      Posts
      8788
      Views

      I do insertWidget(1, rHomeButton_, 0, Qt::AlignRight); and so on for all buttons but it doesn't affect
    • SOLVED Stylesheet in QHBoxLayout embedded in QFormLayout
      General and Desktop • stylesheet qhboxlayout qformlayout fontsize • • gabor53  

      3
      0
      Votes
      3
      Posts
      2314
      Views

      Thank you!
    • QGroupBox does not auto resize when I put QHBoxLayout inside
      General and Desktop • c++ linux qgroupbox qhboxlayout • • marlenet15  

      3
      0
      Votes
      3
      Posts
      963
      Views

      @SGaist I am just using the .ui (Qt Designer).