Navigation

    Qt Forum

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

    • UNSOLVED Setting minimum size on a widget triggers a resizing to content
      General and Desktop • qwidget qlayout size the qdockw • • dporobic  

      1
      0
      Votes
      1
      Posts
      251
      Views

      No one has replied

    • UNSOLVED Maintain aspect ratio of application
      General and Desktop • qlayout • • arjun98  

      2
      0
      Votes
      2
      Posts
      114
      Views

      @arjun98 I think this can be achieved In the layout by setting the strech factor
    • SOLVED layout->removeWidget(QWidget*) not working correctly
      General and Desktop • c++ qlayout qt 5.9.5 • • Daniel_Contro  

      3
      0
      Votes
      3
      Posts
      566
      Views

      Thank you, I actually commented out the delete because I wasn't sure of the removeWidget behaviour, now it works flawlessly
    • SOLVED Hide widget if parent window width <widget.width ?
      General and Desktop • qwidget qlayout qsizepolicy • • Dariusz  

      5
      0
      Votes
      5
      Posts
      461
      Views

      @SGaist I ended up hocking up to resize event of parent widget to find out when size changed & resize my other widget acordingly. I ended up using "invisible" QLabel that retains size as my "spacer". I had to change its spacing role on the go depending of one or more widget are visible or not as I needed to retain correct order. So far works great. TIA
    • SOLVED How to program QScrollArea thorugh QtCreator
      General and Desktop • qtcreator qscrollarea qlayout • • Rohith  

      4
      0
      Votes
      4
      Posts
      1495
      Views

      @Rohith Hi Im not sure what goes wrong. I guess you are still not using the RIGHT click layout menu ? Do not drag layouts from left box. Please see this video. https://www.dropbox.com/s/t3icclcqb446jkm/scroll.mp4?dl=0
    • SOLVED Clarification on deleting layouts and widgets within them
      General and Desktop • qwidget delete qlayout runtime qlayoutitem • • Sh1gs  

      5
      0
      Votes
      5
      Posts
      3416
      Views

      No, it doesn't. The QLayoutItem is not the parent of the widget, it is not a QObject. That's not its job.
    • UNSOLVED Values of dynamically created QLineEdit
      General and Desktop • qlineedit qlayout • • Tirolel  

      4
      0
      Votes
      4
      Posts
      1614
      Views

      @Tirolel If you want t do it that way you shouldn't you cast the widget to find out what type it is before you actually use it? if(qobject_cast<QLineEdit*>(pLine->widget()) != 0) ... Test for which type it is then use the correct type cast to use the actual member functions...
    • UNSOLVED Problem with using layouts with custom widgets
      General and Desktop • qlayout custom widgets • • bigThrum  

      2
      0
      Votes
      2
      Posts
      626
      Views

      @bigThrum Hi, wid->setLayout(layout); wid2->setLayout(layout); This will not work. You need to have a separate layout object for each of your widgets, and a separate set of QPushButton objects for each of the layouts. Kind regards.
    • UNSOLVED Cannot add widgets to layout
      General and Desktop • qwidget qmainwindow qlayout vlc-qt • • AyushExel204  

      18
      0
      Votes
      18
      Posts
      7970
      Views

      @AyushExel204 It is indeed strange. I haven't worked with that library, but I see no good reason that is should work with VlcMediaPlayer but not with VlcMediaListPlayer. In this example (graciously provided by @mrjj over chat), they don't seem to use VlcMediaListPlayer and as you said that should work. Perhaps you can use it to build upon. Also you might want to search through the library's bugtracker to see if there is something known about this issue.
    • UNSOLVED Can VLC-Qt widgets be used as Qt Widgets
      General and Desktop • qwidget qlayout vlc-qt • • AyushExel204  

      3
      0
      Votes
      3
      Posts
      2944
      Views

      Hi, Why can't it be used a QWidgets ? From a quick look at the documentation WidgetVideo is a QWidget so you can put it in a layout. You have to create the WidgetVideo yourself and set it on your media player. WARNING: not tested, it comes from the documentation of VlcQt and their example.
    • UNSOLVED Align buttons on the right side of QHBoxLayout.
      General and Desktop • qlayout qhboxlayout • • tokafr  

      5
      0
      Votes
      5
      Posts
      11964
      Views

      I do insertWidget(1, rHomeButton_, 0, Qt::AlignRight); and so on for all buttons but it doesn't affect
    • UNSOLVED Elements of the same size in two GroupBoxes
      General and Desktop • qtdesigner qlayout qgroupbox • • alan73  

      7
      0
      Votes
      7
      Posts
      1687
      Views

      @Wieland Ah. thank you. Ok, you are right - spacer wont do it. He could set Alignment to right. (for edit) Then they stay same with all the time. Not sure its 100% the wanted effect? https://www.dropbox.com/s/px3t6ir6d767nn7/keepright.zip?dl=0
    • UNSOLVED Why my QWidget does not appear beside the other ones?
      General and Desktop • qwidget qmainwindow qlayout qboxlayout • • neon29  

      2
      0
      Votes
      2
      Posts
      935
      Views

      I'm not that fluent in python, but layout_final.addWidget(self.widgetGL) layout_final.addWidget(self.widget) Horizontal layouts add stuff left to right, so, if anywhere, the GL widget would be on the left, not on the right. I don't think a GL widget has any minimum size. It might be that the other widgets have "greedy" horizontal size policies (I think a label does by default). Try setting a minimum width or an expanding horizontal size policy on the GL widget.
    • UNSOLVED QLayout is wasting space
      General and Desktop • qwidget qlayout • • Ralf  

      7
      0
      Votes
      7
      Posts
      1551
      Views

      I added ui->verticalLayout->parentWidget()->setSizePolicy(QSizePolicy::Policy::Preferred, QSizePolicy::Policy::Maximum); which organized the containing widgets perfectly. But that opened another problem, No I can not resize (move border between dockwidgets) between the Dockwidgets..
    • [Solved] Confused about ownership of widgets in a layout
      General and Desktop • qlayout qlayoutitem • • Jakob  

      3
      0
      Votes
      3
      Posts
      1804
      Views

      @onek24 You're absolutely right. I didn't yet grasp that the QLayoutItem in fact behaves as a kind of proxy for the actual widget (or child-layout). Thanks for the clarification.
    • Add widgets to a layout problem
      General and Desktop • qwidget qlayout qlayoutwidget • • jelicicm  

      6
      0
      Votes
      6
      Posts
      1638
      Views

      I just saw ui->setupUi(this); so you're doing it wrong: you should add your QLineEdits to the layout you put in your Designer made UI.
    • [Solved]QScrollArea Squeezes Child Widgets instead of Expanding Scrollable Area
      General and Desktop • qscrollarea qlayout • • Corpse0327  

      9
      0
      Votes
      9
      Posts
      9458
      Views

      Because it still is a QWidget and setLayout is one of the base function
    • QML webview not fitting in widget layout on android.
      General and Desktop • qlayout qml webview • • musimbate  

      3
      0
      Votes
      3
      Posts
      2009
      Views

      No it didn't work ,the webview was still floating on top of other layed out widgets.Other QML elements fit in ok ,it is just the webview that could not. A temporary solution we used is this : https://github.com/gakwaya/qt-android-native-web-view-example ,I hear that when your UI is completely done in QML ,you don t have this problem ( the mini browser example is a demonstration of that.We were planning on redesigning our UI in QML anyway so this is a plus.
    • Allowing a window to become smaller
      General and Desktop • qwidget qlayout • • Asperamanca  

      6
      0
      Votes
      6
      Posts
      1449
      Views

      @SGaist said: Just one thing, when you say status bar, do you mean QStatusBar ? Yes, at core it's a QStatusBar. @Chris-Kawa said: One way is to put these widgets into a QScrollArea and set the horizontal scroll bar policy of it to Qt::ScrollBarAlwaysOff. This way the "overflowing" content would just be cut off. Sounds like an idea worth to try. Thanks!
    • [SOLVED] QLayout does not work -> experimental Graph like widget
      General and Desktop • qlayout graph • • jjan  

      7
      0
      Votes
      7
      Posts
      2917
      Views

      @Chris-Kawa Sorry that was my problem didn't have seen the comment^^ Thank you :)
    • [solved] How to properly delete a QLayoutItem from the layout
      General and Desktop • qwidget delete qlayout qlayoutitem • • A Former User  

      5
      0
      Votes
      5
      Posts
      4122
      Views

      Yay, that's what I was looking for. Thanks!
    • QLayout: Attempting to add QLayout "" to MainWindow "", which already has a layout [SOLVED]
      General and Desktop • layout qmainwindow mainwindow qlayout • • Robey Mardon  

      4
      1
      Votes
      4
      Posts
      9802
      Views

      Yes, it is right indeed