Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.7k Posts
  • PyQt5: Python

    Solved
    9
    0 Votes
    9 Posts
    867 Views
    C
    @mrjj ah okay thanks :) it was annoying lol
  • Retrieve parent through a Drag & Drop from a QtreeWidget

    Solved
    13
    0 Votes
    13 Posts
    1k Views
    mrjjM
    Hi Super. we need to create our own class (subclass) to change the default drop handlers as they are virtual function and the is the c++ way to implement/change behavior. Hmmmm and what about the dropEvent function what should i change to retrieve the parent information ? Well Im not 100% sure that the default MimeData contains both row and col. The standard mimeformat used can be read like this https://stackoverflow.com/questions/1723989/how-to-decode-application-x-qabstractitemmodeldatalist-in-qt-for-drag-and-drop so it might be enough. If not, you need to handle the DragStart function also to include the information you need.
  • qDebug messages not showing in console window with qInstallMessageHandler implemented

    Unsolved
    2
    0 Votes
    2 Posts
    464 Views
    Christian EhrlicherC
    Works fine for me with Qt5.15.2. Are you sure e.g. QT_NO_DEBUG_OUTPUT is not set in your setup somewhere?
  • QXmlStreamReader and CDATA

    Solved
    2
    0 Votes
    2 Posts
    302 Views
    X
    Finally, I could find the method I was looking for: QXmlStreamReader:: readElementText()
  • QString arg() fixed number of decimal places

    Solved
    3
    0 Votes
    3 Posts
    12k Views
    D
    @eyllanesc Thank you!
  • QWidget.Show()

    Unsolved
    3
    0 Votes
    3 Posts
    315 Views
    C
    Ah okay thank you - it worked :)
  • Determine tray icon locataion on screen.

    Unsolved qscreen qsystemtrayicon
    3
    0 Votes
    3 Posts
    819 Views
    Chris KawaC
    You can do something like this: QPoint tray_center = mTrayIcon->geometry().center(); QRect screen_rect = qApp->screenAt(tray_center)->geometry(); QPoint screen_center = screen_rect.center(); Qt::Corner corner = Qt::TopLeftCorner; if (tray_center.x() > screen_center.x() && tray_center.y() <= screen_center.y()) corner = Qt::TopRightCorner; else if (tray_center.x() > screen_center.x() && tray_center.y() > screen_center.y()) corner = Qt::BottomRightCorner; else if (tray_center.x() <= screen_center.x() && tray_center.y() > screen_center.y()) corner = Qt::BottomLeftCorner; So yeah, screenAt will give you the screen you're on and corner will tell you which corner of the screen are you in. Then you can use qApp->screenAt(tray_center)->availableGeometry() to determine the workable area of that screen and use the corner information to place your widget. You don't need to know if it's a primary , left or right screen. The available geometry is enough for your purpose.
  • Alignment of image and text in QTextTable

    Unsolved qtexttable alignment qtextcursor
    2
    0 Votes
    2 Posts
    620 Views
    SGaistS
    Hi, Please provide a minimal compilable example to reproduce your issue.
  • Font size appears really small when switching from Qt 5.12 to Qt 5.15

    Unsolved font
    4
    0 Votes
    4 Posts
    1k Views
    JoeCFDJ
    something like this. Try it out QFont font("Courier New"); font.setStyleHint(QFont::Monospace); QApplication::setFont(font); or QCoreApplication::setFont(font);
  • GUI Freeze on Multi-Thread Application

    Unsolved threading serial port database multi-thread freeze
    5
    0 Votes
    5 Posts
    1k Views
    SGaistS
    Hi, What kind of popup are triggering the freeze ?
  • Draw with alpha atop of QImage from blob

    Unsolved
    11
    0 Votes
    11 Posts
    638 Views
    SeeLookS
    @JoeCFD In example image I attached before - background is pink and rectangle is as it is. And I also tried to draw that entire image again into painter: p.drawImage(0, 0, frameImage); then draw that rectangle atop of all - still the same difference - no alpha.
  • How to get QtQuick 2.15

    Unsolved
    6
    0 Votes
    6 Posts
    3k Views
    eyllanescE
    @ocgltd It is probably a bug in Qt Creator, so you can use QtQuick 2.15 only that the IDE is not able to recognize it
  • Calling python function from GUI

    Solved
    9
    0 Votes
    9 Posts
    2k Views
    P
    @eyllanesc You are my hero, thank you very much!
  • Jetbrains Toolbox like window

    Solved
    3
    0 Votes
    3 Posts
    298 Views
    D
    Thanks for the links, really helpful.
  • Qt 5 support for iOS 14 and XCode 12?

    Solved
    7
    0 Votes
    7 Posts
    993 Views
    VRoninV
    @mbruel said in Qt 5 support for iOS 14 and XCode 12?: Are you saying that Qt release are available first for those with licence before getting fully exposed? Qt5 has been frozen to Qt 5.15.2 for LGPL but it still gets patch updates from the Qt company for commercial license holders allowing you perfectly to write spreadsheet in your apps I would not say "perfectly". I worked on the project and it is fairly limited in functionality (e.g. there is no way to make a pivot table or add a comment to a cell). It works well to produce basic outputs though, I agree. Why use something bigger with .Net dependency? With more functionality comes more weight
  • In QDrag not work setDragCursor on Windows

    Solved
    2
    0 Votes
    2 Posts
    242 Views
    M
    From the documentation: "Note: setting the drag cursor for IgnoreAction may not work on all platforms. X11 and macOS has been tested to work. Windows does not support it."
  • Issue using static library

    Solved
    6
    0 Votes
    6 Posts
    416 Views
    Pablo J. RoginaP
    @xpog said in Issue using static library: Indeed that was the problem Is your issue solved now? If so, please don't forget to mark your post as such.
  • Int, int8_t, int16_t values

    Unsolved
    2
    0 Votes
    2 Posts
    272 Views
    sierdzioS
    It's impossible to give any answer without more information. Please show your code and explain how you are setting those values. From what you describe it seems to me that you have several instances of your class and read the value from one of them but are setting it on another one. But it's impossible for me to verify this.
  • Update qml component dynamically using C++

    Solved
    5
    0 Votes
    5 Posts
    439 Views
    B
    @J-Hilk Thanks for judging my skills based on one example, really appreciated.
  • Can't access QBluetoothDeviceInfo and QBluetoothDeviceDiscoveryAgent in qt 5.15

    Unsolved
    11
    0 Votes
    11 Posts
    770 Views
    B
    @Raviteja0101 The error you're getting is pretty clear. The plot class doesn't have a variable named ui. I'm not familiar with the code in plot class, but probably by removing ui->plot-> it might work.