Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved
    1. Home
    2. Tags
    3. size

    Log in to post
    • All categories
    • Narutoblaze

      Unsolved changing height of Qtablewidget Cells
      General and Desktop • qtablewidget qsizepolicy qt6.5.0 qlayout size • • Narutoblaze

      5
      0
      Votes
      5
      Posts
      92
      Views

      Narutoblaze

      @mpergand

      Did not worked :

      setSectionResizeMode(QHeaderView::Fixed); setDefaultSectionSize(10);
    • T

      Unsolved QtQuick Layouts: Why don't the width and height settings affect anything inside the ColumnLayout?
      QML and Qt Quick • qml size columnlayout rectangle width • • tomendop

      2
      0
      Votes
      2
      Posts
      56
      Views

      B

      @tomendop see documentation for "Layout QML Type". It states:

      Note: It is not recommended to have bindings to the x, y, width, or height properties of items in a layout, since this would conflict with the goals of Layout, and can also cause binding loops.

      I can't say exactly what is going wrong in your example, but it is basically that you are doing something you aren't supposed to do when you choose to use the Layout mechanism.

      I think it can be quite confusing as QML has a number of different ways to manage layout and it isn't always obvious which way is best or most appropriate.

    • V

      Solved Limit height of the QListWidget to accomodate only single row
      General and Desktop • qlistwidget sizepolicy sizehint size • • voltron

      6
      0
      Votes
      6
      Posts
      191
      Views

      V

      Kind of solved. If I set sizeAdjustPolicy to AdjustToContents and sizePolicy to Maximum, the list widget size will adjust to accomodate items plus small margins around them. I'm quite happy with the result, it would be even better if I could make items equally distribute across available space, but even now it looks good enough.

    • D

      Solved How to find out the initial size of a widget?
      General and Desktop • initialization size maximized • • dave2

      9
      0
      Votes
      9
      Posts
      277
      Views

      D

      @hskoglund I confirm that this works nicely. Thanks!

    • timob256

      Solved QApplication::desktop()->screenGeometry() not work in qt6
      General and Desktop • qt6.2 qapplication size • • timob256

      6
      0
      Votes
      6
      Posts
      3423
      Views

      Christian Ehrlicher

      @jsulm said in QApplication::desktop()->screenGeometry() not work in qt6:

      What error?

      You have to know this ! I mean - is your crystal ball not working today?

      Educated guess: If you want to use QDesktopWidget you should insert the header where the class is defined - basic C

    • J

      Unsolved How to get screen size in PyQt6?
      Qt 6 • pyqt screen size • • Jbone73

      3
      0
      Votes
      3
      Posts
      2203
      Views

      Christian Ehrlicher

      QScreen should also be available for PyQt.

    • jeanmilost

      Unsolved Why my scrollbars are not updating their total scroll size when content size changes?
      QML and Qt Quick • zoom scroll scroll bar size page • • jeanmilost

      2
      0
      Votes
      2
      Posts
      310
      Views

      A

      @jeanmilost
      Your logic seems to be correct.
      What you have to do is to move the re-calculation of Scrollbar size & position to the Rectangle rcPageContainer because you are applying scale for that.

      Rectangle { id: rcPageContainer objectName: "rcPageContainer" ... /// called when page viewport width changed onWidthChanged: { sbHorz.size = rcPageViewport.width / rcPageContainer.width sbHorz.position = Math.min(Math.max(sbHorz.position, 0.0), 1.0 - (sbHorz.size)); } /// called when page viewport height changed onHeightChanged: { sbVert.size = rcPageViewport.height / rcPageContainer.height sbVert.position = Math.min(Math.max(sbVert.position, 0.0), 1.0 - (sbVert.size)); } }
    • F

      Unsolved What is "hint" and for what is it good for?
      General and Desktop • sizehint size • • firen

      4
      0
      Votes
      4
      Posts
      156
      Views

      jsulm

      @firen Read "Size Hints and Size Policies" in https://doc.qt.io/qt-5/qwidget.html

    • A

      Unsolved How do you properly increase QLineEdit increase icon size/
      General and Desktop • qlineedit icon size pixelated • • arjun98

      4
      0
      Votes
      4
      Posts
      945
      Views

      nagesh

      @arjun98 said in How do you properly increase QLineEdit increase icon size/:

      ui->searchbar->setClearButtonEnabled(true);
      ui->searchbar->QLineEdit::addAction(QIcon(":/img/icons/icon_search.png"), QLineEdit::LeadingPosition);

      I have tried loading icon to line edit using above code, it's clearly visibile. and image is not blurred.
      try to experiment loading the icon to QLineEdit without any stylesheet being set to it.

    • cerr

      Solved Why does QPushButton not respect absolute pixel size?
      Mobile and Embedded • pyqt4 qpushbutton size layout issues • • cerr

      5
      0
      Votes
      5
      Posts
      483
      Views

      cerr

      @SGaist Yes Thank! It all makes sense now!

    • A

      Unsolved QDockWidget split size
      General and Desktop • qdockwidget split size • • avmg

      12
      0
      Votes
      12
      Posts
      1193
      Views

      SGaist

      Did you check the KDDockWidgets project ? They might have your issue handled.

    • M

      Unsolved How to change the width of QDialogbox with the click of a button
      General and Desktop • c++ qdialog size • • Mr-Workalot

      2
      0
      Votes
      2
      Posts
      269
      Views

      Pl45m4

      @Mr-Workalot

      First of all, it seems that you don't use any layouts.
      Secondly, don't hide your widget by just resizing your dialog (if you are trying to do that). Better hide the widget itself.

      To set a width anyway, you can use
      QWidget::resize(int w, int h)

    • D

      Solved Strange QMainWindow Layout behaviour
      General and Desktop • layout qmainwindow size • • DL5EU

      12
      0
      Votes
      12
      Posts
      1368
      Views

      SGaist

      Glad you found out and thanks for the detailed solution !

    • C

      Unsolved Size of image in text
      QML and Qt Quick • html img size width height • • Cynthia.Roush

      5
      0
      Votes
      5
      Posts
      771
      Views

      C

      @Jkimmy Thank you for your help.

    • C

      Solved How to fit a QWidget children in a QWidget parent?
      General and Desktop • qwidget geometry parent & child size sizepolicy • • cristiano.narcisi

      8
      0
      Votes
      8
      Posts
      5910
      Views

      C

      @JonB
      I am passing to QML for this reason. There, placement and dimensioning of graph oblect is very easy to do. I like also the stong division between frontend a nd backend!!!

    • G

      Solved QPixmap size limit
      General and Desktop • qpixmap size • • Gianluca86 0

      6
      0
      Votes
      6
      Posts
      828
      Views

      G

      @mrjj Thanks for the help

    • N

      Unsolved Paint Event and Zoomed In Image Problem
      General and Desktop • paint event painter zoom size qlabel • • Nalu323

      4
      0
      Votes
      4
      Posts
      825
      Views

      N

      @mrjj I tried your code, here's the result:
      0_1549363016752_5cd8c55d-9905-4b92-bb0b-126715f37cae-image.png