Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.8k Posts
  • Is there a way of reusing a QIcon in differents QPushButtons?

    Unsolved qpushbutton qicon
    13
    0 Votes
    13 Posts
    2k Views
    JoeCFDJ
    @JonB d->icon = icon; this invokes QIcon's equal operator =(). You are right: QIcon has some sort of reference count. I will have a detailed look at it.
  • Presence of private APIs in Qt 6.4.2's QtCore | macOS

    Unsolved macos private api qt 6.4.2 qtcore
    3
    0 Votes
    3 Posts
    923 Views
    S
    @Christian-Ehrlicher I have used the -appstore-compliant option on the final .app made with Xcode. I used nm on the .app after using macdeployqt and it still showed the presence of the two APIs within it. I think I will have to make my own custom Qt using the appstore-compliant feature. Surely you mean I have to compile Qt with the "appstore-compliant" feature turned ON? I know it is supposed to be turned ON by default for Qt downloaded through the maintenancetool. Maybe the Qt 6.4.2 that's available through the maintenance tool wasn't built with the appstore-compliant feature turned ON?
  • Solved Qt 5.15.12 on Visual Studio - getting rebuild when code is up to date

    Unsolved
    6
    0 Votes
    6 Posts
    2k Views
    R
    @dherold Thanks very much. This resolved an issue I had been having with QT and Visual studio 2022. Rebuilding all files even if only one file had been changed. Went back to the version extension of QT and all is fine now. Originally thought it had to do with an update to Visual. Much appreciated!!
  • I can't access the variable in the structure from within the class

    Unsolved
    6
    0 Votes
    6 Posts
    540 Views
    jsulmJ
    @mamoo said in I can't access the variable in the structure from within the class: it just reads my array variable 'mSepetler' as empty What exactly is "empty"? The array itself is for sure not empty as it has fixed size of 4 elements. You should really provide more details.
  • The flag CONFIG += c++14 is not working

    Unsolved
    3
    0 Votes
    3 Posts
    239 Views
    K
    @jsulm I'm using QT6. Thought that the requirement of C++17 is only for compiling QT sources.
  • SVG icons are stretched (not drawn pixel-perfect) with display scaling enabled

    Solved
    2
    0 Votes
    2 Posts
    429 Views
    V
    Turns out that creating icons via QPixmap is an anti-pattern. It is drawn correctly if constructing QIcon directly: QIcon icon("icon.svg");
  • How to write connect function to implement UDP Client

    Solved
    3
    0 Votes
    3 Posts
    321 Views
    T
    @JonB Thank you!
  • Change the size of the Tab Widget icon

    Solved
    9
    0 Votes
    9 Posts
    2k Views
    R
    @JonB Ok it works well, I didn't understand that tabWidget was applied to all the tabs of the GUI. Thanks for help
  • 'byte': ambiguous symbol when building with QT6

    Unsolved
    11
    0 Votes
    11 Posts
    5k Views
    K
    @JonB after i removed all the using namespace std instances from all my code the problem is gone but this means that the library is setting a policy for the program. Thought about defining my own header in QT sources that will have the definition of byte and then including this header at the beginning of the QT program. Is this possible? Do you know in which file i need to add this header?
  • How fix the QPalette QSTYLE problem?

    Unsolved
    4
    0 Votes
    4 Posts
    343 Views
    nicker playerN
    @nicker-player I know why the background is dark color. Cause I used the {background:transparent;} qstyle code.How to prevent the parent widget influenced the child qcombobox by using the code "background:transparent;" By using the code QComboBox{background-color:white;} seemed unuseful.
  • Issue creating widget plugin

    Unsolved
    8
    0 Votes
    8 Posts
    500 Views
    DragoonD
    @Christian-Ehrlicher Nope... the error was a line of code of the widget class that was shared both from plugin and application form . So it should have repoted in both compliation stages... anyway at this time is fixed.
  • backgroudRole() of QFrame

    Unsolved
    3
    0 Votes
    3 Posts
    295 Views
    D
    Thank you
  • [SOLVED] How to detect SHIFT key release event?

    6
    0 Votes
    6 Posts
    4k Views
    D
    Found a solution. def _event(self, event: QEvent): if event.type() == event.Type.KeyRelease: # region Release SHIFT Key if QKeyEvent(event).key() == Qt.Key.Key_Shift and self.shift_key_locked: self.shift_key_locked = False # endregion if event.type() == event.Type.KeyPress: # region SHIFT Key if QKeyEvent(event).modifiers() == Qt.KeyboardModifier.ShiftModifier and not self.shift_key_locked: self.shift_key_locked = True # endregion
  • Is there a way to draw a heatplot with QPolarChart, or any other method in Qt?

    Unsolved
    1
    0 Votes
    1 Posts
    160 Views
    No one has replied
  • QBluetoothServiceDiscoveryAgent fails to "find " all bluetooth devices

    Unsolved
    1
    0 Votes
    1 Posts
    149 Views
    No one has replied
  • QTcpSocket and QUdpSocket on Windows 10, blocked?

    Solved
    22
    0 Votes
    22 Posts
    5k Views
    D
    You can check the Windows 10 firewall settings to make sure that your applications are allowed through. Just search for ""firewall"" in the Start menu and click on ""Windows Defender Firewall"". From there, you can click on ""Allow an app or feature through Windows Defender Firewall"" and make sure that your applications are checked.
  • Easy bluetooth wrapper in Qt

    Unsolved
    5
    0 Votes
    5 Posts
    371 Views
    SGaistS
    @ocgltd I do not have a deep knowledge of BLE but based on the articles you linked, it would be possible to implement the chat example with a custom service. The chat example uses a Bluetooth standard protocol that is not available in Bluetooth LE.
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    2 Views
    No one has replied
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    5 Views
    No one has replied
  • can not append 0x00 into a QByteArray

    Solved
    5
    0 Votes
    5 Posts
    2k Views
    JonBJ
    @agmar Damn! Well I guessed right anyway... :)