Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.6k Posts
  • Window transparency issue on Windows 11

    Unsolved
    3
    0 Votes
    3 Posts
    600 Views
    J
    @SGaist No, I haven't tried it yet because there is currently no dev system set up to build the source at the moment. As this might be quite some work, I hoped for somebody to recognize this issue so that I could estimate how difficult it might be to fix the issue.
  • Changing the line height of QLabel

    Solved
    8
    0 Votes
    8 Posts
    2k Views
    C
    @Dummie1138 The natural vertical spacing of text automatically wrapped or with deliberate line breaks is given by QFontMetrics::lineSpacing(). This figure is a function of font and size and is not adjustable out-of-the box. You can subclass QLabel and provide your own rendering.
  • A rectangle box like this appearswhen graph plotting, how to remove it.

    Solved
    4
    0 Votes
    4 Posts
    374 Views
    jsulmJ
    @Ramkumar-Mohan said in A rectangle box like this appearswhen graph plotting, how to remove it.: The tooltip generated automatically Should not happen. But you do not show any code, so don't know why it is there.
  • QWidget::pos() using Ubuntu on WSL

    Unsolved
    8
    0 Votes
    8 Posts
    2k Views
    C
    @Chris-Kawa Curioser and Curioser. I took Chiri's advice and moved the code into closeEvent and first showEvent. Nothing changed. Except on further instpection I see the bogus position changes from -3,30 to -6,60, -9, 90 etc. I neglected to say I am running this from qtCreator, so I don't know if this affects things; it doesn't on windows. So I started to hook moveEvent, resizeEvent. and mouseMoveEvent. Interestingly resizeEvents and mouseMoveEvents work perfectly, but I am not getting moveEvents at all, even though I can move the windoews with a mouse. So I am about at the end of the road on this. I'm saying to myself 'it just doesn't work right using WSL'. I'd be interested if anyone is doing this using WSL and says 'yes it works' or has repoduced this using an app with a single widget and sees if they get moveEvents or get reasoanable values from pos(). I may get an old real Linux box out of storage sometime and see if it works - but I would expect it does, it worked the last time I tried it, but that was back in the days of qt5 and I'm now running qt6.5.0. Thanks for the advice, David
  • 0 Votes
    4 Posts
    356 Views
    JoeCFDJ
    @JoeCFD Just checked the doc of gstreamer qmlglsink element and it requires QQuickItem. QGraphicsVideoItem will not work.
  • QBluetoothSocket baud rate

    Unsolved
    4
    0 Votes
    4 Posts
    509 Views
    Kent-DorfmanK
    bluetooth is a generic protocol stack that nests services. socket APIs don't understand the concept of "baud rate". They are not applicable and the comms uses what bandwidth/speed is available. When you tunnel a "serial port" session, that type of connection has an inherent baud rate associated with it, but it's up to the bluetooth stack to decide whether it cares about about that parameter, either transferring data as fast as the medium will allow for, or inserting idle time in the serial stream to give the effect of the slower baud rate.
  • QtWebEngine scrollbars Look like Chrome?

    Unsolved
    2
    0 Votes
    2 Posts
    200 Views
    JonBJ
    @nshiell QtWebEngine is indeed Chromium, so should look like Chrome. I don't think you can access them programatically, use QSS/CSS to style them as best you can.
  • Closing a parent from a child

    Unsolved
    4
    0 Votes
    4 Posts
    345 Views
    JonBJ
    @Dummie1138 I echo @Christian-Ehrlicher's comment, do you really want to close a parent from a child? Like in the real world, it should not be allowed to do that. I can't imagine a scenario where it's a good idea. Why can't parent close itself when child closes if that's what's wanted? For example, instead of connect(this, SIGNAL(destroyed()), this->parent(), SLOT(close())); it would be much more acceptable if parent did a connection like connect(child, &ChildClass::destroyed, this, &ParentClass::close); // or use eventFilter() from parent // or subclass ChildClass and emit signal from closeEvent()
  • No matching member function for call to connect, for class of subclass QDialog

    Solved
    4
    0 Votes
    4 Posts
    309 Views
    jsulmJ
    @Dummie1138 said in No matching member function for call to connect, for class of subclass QDialog: connect(&passwordbox, SIGNAL(passwordCorrect()), this, SLOT(unlockScreens())); That's why I asked what type passwordbox is. It looks like it is not a pointer, but connect expects pointers. So, what you have now is not a workaround, but the correct way to use connect.
  • Error in uiplugin .pro file Qt 6.4.3

    Solved
    11
    0 Votes
    11 Posts
    1k Views
    giorgik63G
    @JoeCFD Finally I managed to solve the problem. It was enough to use designer instead of uiplugin. Then I had to verify that the right Qt 6.4.3 library was being used from the Projects tab and from the Kits. So to test the plugin I used the Qt Designer version based on Qt 6.4.3 creating a new form of the same type created automatically by Qt Creator and copied it into the test project directory. Now everything is fine. I then did another test by recreating the whole project using the new Qt 6.5.1 libraries and it worked here too. So always remember to check that you are using the right library version and the right Qt IDE based on that library.
  • HLS playback in Qt 6 in Windows ?

    Unsolved qtmultimedia hls
    7
    0 Votes
    7 Posts
    2k Views
    O
    So 6.5.1 is out and this should now be fixed, but nope, it starts, debug output shows hls playlist information but the it just ends with "Operation not permitted". Same url works with ffplay just fine. sigh.
  • Qt Thread architecture

    Solved
    14
    0 Votes
    14 Posts
    1k Views
    K
    @SGaist Thx you for link, it was my mistake.
  • Handling colorSchemeChanged

    Unsolved
    6
    0 Votes
    6 Posts
    690 Views
    PerdrixP
    @SGaist Further digging has determined that the Palette colours are NOT BEING UPDATED AT ALL when the theme is changed.
  • QMenu is cropped on Windows with high scaling factor

    Unsolved
    1
    0 Votes
    1 Posts
    184 Views
    No one has replied
  • First app, trying to connect QGraphicsLineItems to MainWindow slot.

    Solved qt c++
    13
    0 Votes
    13 Posts
    1k Views
    GilboonetG
    And as you mentioned that I used c-style cast, I read C++ doc and learned about C++-style cast that I didn't knew. So what I need to use is static_cast and my code becomes TitleItem * ti = static_cast<TitleItem*>(parentItem()); Well I think that this first publication of mine is now solved. Thank you. I also learn that a post can only be edited 3600 seconds after it is submitted.
  • Embed qt translation into executable in static app

    Solved
    7
    0 Votes
    7 Posts
    559 Views
    S
    @Cobra91151 said in Embed qt translation into executable in static app: Get the required default Qt translation (qt_*) files. This seems like the proper solution.
  • pasting "QT_FEATURE_" & processenvironment does not give a valid preprocessing token

    Unsolved
    2
    0 Votes
    2 Posts
    257 Views
    jsulmJ
    @Aj_Phantom Please post the whole error message. Did you build the app inside the virtual machine or did you copy a build from your host machine to the virtual one?
  • how do i start qt creator from terminal

    Solved
    4
    0 Votes
    4 Posts
    2k Views
    serkan_trS
    @JoeCFD thank you it worked
  • Need Qt sample c++ code for zebra barcode scanner

    Unsolved
    5
    0 Votes
    5 Posts
    830 Views
    C
    @Karuppu It looks to me from the published examples that the Core Scanner API is an ActiveX component in Windows. You can use this through direct Windows API programming, with or without MFC, or using Active Qt. If you are expecting someone else to write this so that you copy and paste then you may be waiting a long time.
  • Getting the parent from QGraphicsScene?

    Unsolved
    7
    0 Votes
    7 Posts
    983 Views
    Clone45C
    @JonB said in Getting the parent from QGraphicsScene?: @Clone45 You can always subclass QGraphicsScene to add your own explicit pointer to some specialized class with relevant stuff in it. Just it would be best if it does not rely on its QObjects parent's characteristics too much. Thank you. I think that I'm leaning that the hard way tonight. I'll go ahead and subclass QGraphicsScene and manage the relationship myself.