Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.6k Posts
  • Using poppler-qt6 for qt project on macOS

    Unsolved
    7
    0 Votes
    7 Posts
    1k Views
    SGaistS
    Then it's a good first step so you will get these extra find modules for cmake which contains one for poppler. Otherwise, use CMake's find_library and find_path functions.
  • Qt5.15.14 does not display the title bar on the linuxfb platform

    Unsolved
    9
    0 Votes
    9 Posts
    698 Views
    JoeCFDJ
    @Leyu the Linux framebuffer platform doesn't natively support window decorations such as title bars. I guess it is not hard to create your own titlebar.
  • Is this how QSpinBox is supposed to look now, or a bug?

    Solved
    5
    0 Votes
    5 Posts
    435 Views
    V
    Awesome, that did it, thank you!
  • Application doesn't find Qt libraries during compilation process

    Solved
    9
    0 Votes
    9 Posts
    768 Views
    Pl45m4P
    @tankist You could split your whole app into two components. One non GUI or non Qt background/ console program and one Qt GUI part which is responsible for the system tray menu.
  • Capturing mouseEvents

    Unsolved
    6
    0 Votes
    6 Posts
    491 Views
    jsulmJ
    @gabello306 said in Capturing mouseEvents: Any ideas? Maybe because you've overridden the mousePressEvent? Do you call inherited mousePressEvent in your mousePressEvent?
  • QPdfWriter and Qpainter Position

    Solved
    5
    0 Votes
    5 Posts
    540 Views
    J
    @Bonnie thanks a lot It is indeed a 12.5-fold relationship.
  • 0 Votes
    7 Posts
    772 Views
    S
    The QWindow::activeChanged signal allows me to call the delegate function when the window is actually activated.
  • Build 6.8.1 from source. FAILED: src/gui/.qt/rcc/qrc_qpdf.cpp

    Unsolved
    5
    0 Votes
    5 Posts
    460 Views
    SGaistS
    What exactly did you download ? "Some zip file somewhere on GitHub" does not telle what you got. Based on the error message you don't have the full sources. If you want them you better download them from the official archives.
  • Problem using QTableView and QAbstractTableModel with QGridLayout

    Unsolved
    7
    0 Votes
    7 Posts
    406 Views
    SGaistS
    Hi, Beside what my fellows correctly pointed (nothing widgets related should be put into a model and QWidget is the base class for anything widget), you seem to need a custom vizualization of your data. If that is indeed the case, then the correct class to check is QStyledItemDelegate. That said, you still haven't really explained your goal and what exactly you want to show. It really seems that you want your text to be shown in the center of a cell which really does not require all the complexity you are describing.
  • How to install Qt5.15. x on a Mac with Apple chips

    Unsolved
    2
    0 Votes
    2 Posts
    211 Views
    SGaistS
    Hi, You might want to compile it yourself. 5.15.2 is x86_64 only so while it can work thanks to Rosetta you'll have trouble with external librairies.
  • How to prevent a QIcon from getting highlighted?

    Unsolved
    10
    0 Votes
    10 Posts
    834 Views
    V
    QIcon icon(":/path_to_icon"); icon.addFile(":/path_to_icon", {}, QIcon::Selected); listItem->setIcon(icon); Tested on qt 5.15 in QListWidget.
  • Frequency of MouseMoveEvents lower with Qt 6

    Unsolved mousemoveevent qt6 performance
    5
    0 Votes
    5 Posts
    700 Views
    letsfindawayL
    @Pl45m4 Here is a short video of the application showing the issue: https://github.com/letsfindaway/OpenBoard/issues/203#issuecomment-2595705681 The rubber is a pixmap cursor using QCursor. The circle is repositioned at each mouseMoveEvent. You see that it is lagging behind the cursor. The preview image to the left is the second view attached to the same scene. So you see, nothing complicated. And as I already said in the beginning: when I run the same program using Qt5, then the lag is much smaller, because the repetition rate of the mouseMoveEvents is higher. I have setMouseTracking(true), so that I get the events even when the mouse button is not pressed. And no, there are no further actions connected to the movement as long as the mouse button is not pressed.
  • QHeaderView: Stretch *and* ResizeToContents?

    Solved
    8
    0 Votes
    8 Posts
    4k Views
    KaguroK
    Hi! Is there any better solution for this problem, or still is this the best way?
  • Resize handles not visible in QDockWidget

    Unsolved
    8
    0 Votes
    8 Posts
    691 Views
    SGaistS
    Then there's the good old: comment out everything and add things back until it breaks.
  • Issue with building Qt 5.15.16 for UWP arm

    Solved
    9
    0 Votes
    9 Posts
    810 Views
    Cobra91151C
    Hello! I removed the jom from PATH environment variable to use nmake to get the proper error message. I get the following issue: Running configuration tests... Checking for valid makespec... + cd /d C:\QtBuild\qt-everywhere-src-5.15.16\qtBuild\config.tests\verifyspec && C:\QtBuild\qt-everywhere-src-5.15.16\qtBuild\qtbase\bin\qmake.exe "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += shared warn_off console single_arch" "QMAKE_LFLAGS += /ENTRY:main" -early "CONFIG += cross_compile" C:/QtBuild/qt-everywhere-src-5.15.16/qtbase/config.tests/verifyspec + cd /d C:\QtBuild\qt-everywhere-src-5.15.16\qtBuild\config.tests\verifyspec && set MAKEFLAGS=& nmake > Microsoft (R) Program Maintenance Utility Version 14.29.30158.0 > Copyright (C) Microsoft Corporation. All rights reserved. > cl -c -nologo -FS -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus -O2 -MD -W0 -GR -EHsc -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQ_BYTE_ORDER=Q_LITTLE_ENDIAN -D_ENABLE_EXTENDED_ALIGNED_STORAGE -DWINAPI_FAMILY=WINAPI_FAMILY_PC_APP -DWINAPI_PARTITION_PHONE_APP=1 -DARM -D__ARM__ -D__arm__ -DNDEBUG -IC:\QtBuild\qt-everywhere-src-5.15.16\qtbase\config.tests\verifyspec -I. -IC:\QtBuild\qt-everywhere-src-5.15.16\qtbase\mkspecs\winrt-arm-msvc2019 -Fo @C:\Users\cobra\AppData\Local\Temp\nm3D22.tmp > verifyspec.cpp > link /NOLOGO /DYNAMICBASE /NXCOMPAT /NODEFAULTLIB:ole32.lib /APPCONTAINER /MACHINE:ARM /NODEFAULTLIB:kernel32.lib /ENTRY:main /INCREMENTAL:NO /SUBSYSTEM:WINDOWS /MANIFEST:NO /OUT:verifyspec.exe @C:\Users\cobra\AppData\Local\Temp\nm3D71.tmp > LINK : fatal error LNK1181: cannot open input file 'ucrt.lib' > NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\bin\HostX86\ARM\link.EXE"' : return code '0x49d' > Stop. ERROR: Cannot compile a minimal program. The toolchain or QMakeSpec is broken. C:\QtBuild\qt-everywhere-src-5.15.16\qtBuild> The problem was with > LINK : fatal error LNK1181: cannot open input file 'ucrt.lib'. I found out that this issue is causing the latest Windows SDK - 10.0.26100.0: https://discussions.unity.com/t/info-link-fatal-error-lnk1181-cannot-open-input-file-ucrt-lib-hololens-2-build-issue/950584/3 So, I used the following Windows SDK: 10.0.22621.0 and run: "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars32.bat" 10.0.22621.0 Now, it completed the configuration and I successfully built Qt 5.15.16 for winrt-arm-msvc2019 architecture. This issue is resolved. Thanks.
  • Installing Qt5 on the latest online installer

    Solved
    17
    1 Votes
    17 Posts
    2k Views
    B
    @jsulm okay thanks I tried it and it worked. qt-online-installer-windows-x64-4.8.1.exe --mirror http://qt.mirror.constant.com
  • 0 Votes
    2 Posts
    157 Views
    enjoysmathE
    I think I've got it, I look at the parent container's arrows (BigCat's arrows). Anything connected to the nodes I'm moving might trigger updates (in the case of setPos). This is a nice way, because I can be sure I have everything and it's iterative / without signals/slots. For the child added / removed it's the same principal.
  • How to pack QGridLayout

    Solved
    3
    0 Votes
    3 Posts
    353 Views
    A
    ok, I kinda get it now. I can just add spacers left and right and set fixed widths to get what I wanted. Namely, 8 80x80 pixel tiles packed together and centered along the middle of the 1600px width which is the middle of the 2 videos. [image: a76c4b24-f511-4a8e-af73-7c00637a78be.png] this gets me what I wanted: category_label = QLabel("Ball Flight\nDetails") category_label.setFixedSize(200, 80) category_label.setAlignment(Qt.AlignmentFlag.AlignRight | Qt.AlignmentFlag.AlignVCenter) category_label.setStyleSheet("font-weight: bold;") self.infoGrid.addWidget(category_label, 0, 0, 1, 1) categories = ["Club\nSpeed", "Attack\nAngle", "Spin\nRate", "Carry\nDistance", "Club\nPath", "Face\nto Path", "Side\nSpin", "Back\nSpin"] values = [128, 15, 3000, 250, 270, 30, 200, 2500] hSpace = QWidget(); hSpace.setSizePolicy(QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum) self.infoGrid.addWidget(hSpace, 0, 1) row = 0 for i in range(len(categories)): col=i+2 print(f"Adding content at {row},{col}") tile_widget = QWidget() tile_widget.setFixedSize(80, 80) tile_layout = QVBoxLayout(tile_widget) tile_layout.setContentsMargins(0,0,0,0) tile_layout.setSpacing(0) name_label = QLabel(categories[i]) name_label.setAlignment(Qt.AlignmentFlag.AlignCenter| Qt.AlignmentFlag.AlignBottom) name_label.setStyleSheet("font-weight: bold; color: black;") value_label = QLabel(str(values[i])) value_label.setAlignment(Qt.AlignmentFlag.AlignCenter| Qt.AlignmentFlag.AlignTop) value_label.setStyleSheet("font-weight: bold; font-size: 24px; color: white;") tile_layout.addWidget(name_label) tile_layout.addWidget(value_label) tile_widget.setStyleSheet("border: 1px solid lightblue; background-color: lightblue; border-radius: 10px;") self.infoGrid.addWidget(tile_widget, 0, col, alignment=Qt.AlignmentFlag.AlignHCenter|Qt.AlignmentFlag.AlignVCenter) hSpace = QWidget(); hSpace.setFixedWidth(470) hSpace.setSizePolicy(QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum) self.infoGrid.addWidget(hSpace, 0, 10)
  • QIFW maintenancetool uninstall not working from Windows Settings

    Unsolved
    4
    0 Votes
    4 Posts
    427 Views
    G
    https://bugreports.qt.io/browse/QTIFW-3330
  • QGraphicsScene Composition modes

    Solved qt c++ compositionmode qpainter
    3
    0 Votes
    3 Posts
    453 Views
    S
    @Pl45m4 Yeah forgot to set opacity to something else than 1, that solved it...