Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.8k Topics 458.5k Posts
  • Reporting inappropriate content on the forums

    Pinned Locked spam
    29
    4 Votes
    29 Posts
    36k Views
    A
    Thank you for the report. I have banned the user, which got rid of the spam posting. Not a loss, as this user did not post any other content on the site. Just deleting this one posting was not possible. Thanks for reporting this.
  • How to extract text from PDF?

    Unsolved
    5
    0 Votes
    5 Posts
    1k Views
    J
    @Jerry-van-de-Bunt said in How to extract text from PDF?: Jerry van de Bunt wrote on 1 Nov 2024, 01:37 last edited by #1 Hi everyone, How can I extract text from a PDF file? 😁 Extracting text from a PDF depends on whether the file is text-based or scanned. For text-based PDFs, many tools can directly copy or export the content. However, scanned or image-based PDFs require OCR (Optical Character Recognition) to accurately extract readable text. While online tools exist, they often raise concerns about data privacy and file size limits. A reliable offline solution is SysTools PDF Extractor. It allows you to extract text from single or multiple PDF files with high accuracy, supports scanned PDFs using OCR, and preserves the original formatting. It’s an efficient and secure option for professionals who regularly work with PDF documents.
  • QTextBrowser link opens Notepad on Windows ???

    Unsolved
    1
    0 Votes
    1 Posts
    10 Views
    No one has replied
  • How to add a text label with every shape I draw using QPainter

    Unsolved
    13
    0 Votes
    13 Posts
    2k Views
    W
    Is there any question related to draw some text near the lines of your shape?
  • Bug with Pyside 6

    Solved
    6
    1 Votes
    6 Posts
    254 Views
    F
    From the Python point of view, the example does not work (wrong imports for QVector3D/Qt3Window). The revised example without cleanup import sys from PySide6.QtWidgets import QApplication, QMainWindow, QWidget from PySide6.QtGui import QVector3D from PySide6.Qt3DExtras import Qt3DExtras from PySide6.Qt3DCore import Qt3DCore class Simple3DWindow(Qt3DExtras.Qt3DWindow): def __init__(self, parent=None): super().__init__(parent) self._root_entity = Qt3DCore.QEntity() self.setRootEntity(self._root_entity) self.camera().lens().setPerspectiveProjection(45.0, 16.0/9.0, 0.1, 1000.0) self.camera().setPosition(QVector3D(0, 0, 20.0)) self.camera().setViewCenter(QVector3D(0, 0, 0)) def main(): app = QApplication(sys.argv) main_window = QMainWindow() main_window.setWindowTitle("Test QWindowContainer Segfault") main_window.resize(800, 600) display = Simple3DWindow() container = QWidget.createWindowContainer(display) # ← Problem here main_window.setCentralWidget(container) main_window.show() result = QApplication.exec() # QApplication will be automatically destroyed by PySide6 β†’ SEGFAULT return result if __name__ == "__main__": sys.exit(main()) does not show any crashes. There are some situations though in PySide, where an explicit synchronous cleanup or shutdown of graphics resources is required. This is then best done in an overridden closeEvent() of the top level window. Also note that Qt3D is now deprecated.
  • Make an application follow the platform theme (Linux)

    Unsolved
    9
    0 Votes
    9 Posts
    216 Views
    I
    @BastienSante said in Make an application follow the platform theme (Linux): When setting QT_DEBUG_PLUGINS to 1 and launching the app from a terminal, the output shows the plugins are detected, however I don't see any one having to do with themes. Maybe this plugin does not work with Qt 6.10.1 ? Well that probably means that the plugins aren't there... post the output generated by it (ideally as a link to a pastebin or gist, the output is quite long usually) and I could tell you perhaps.
  • QSocketNotifier and libgpiod on Raspberry Pi

    Solved
    7
    0 Votes
    7 Posts
    156 Views
    SGaistS
    Excellent ! Thanks for the feedback ! Since you have it working now, please mark the thread as solved using the "Topic Tools" button or the three dotted menu beside the answer you deem correct so other forum users may know a solution has been found :-)
  • Text drop shadow inside a custom paint function of QStyledItemDelegate

    Unsolved
    4
    0 Votes
    4 Posts
    69 Views
    S
    I've found an answer using QGraphicsDropShadowEffect on Stack Overflow: You can use QGraphicsPixmapItem to apply the effect purely on a pixmap instead of a widget, and use QGraphicsScene to render back to a pixmap. Not sure how expensive that is, might make sense to also throw QPixmapCache into the mix. I wanted to post the Python code for the solution translated to my use case, but the forum thinks that's spam, so πŸ€·β€β™‚οΈ.
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    8 Views
    No one has replied
  • How to create a Single Application in Qt QuickWidget 6.9.1

    Solved
    2
    0 Votes
    2 Posts
    39 Views
    SGaistS
    Hi, Look for QtSingleApplication
  • Google OAuth 2 Login on Qt 6.9.1

    Unsolved
    5
    0 Votes
    5 Posts
    160 Views
    SGaistS
    @Blackzero usually, applications spin a local web server to get the answer of the authentication process and basically asks the user to close the web page.
  • Trouble trying to use ASAN

    Unsolved
    16
    1 Votes
    16 Posts
    209 Views
    KH-219DesignK
    Again, I'm unfamiliar with MSVC range of sanitizer possibilities, but... Is UBSan available? Using both ASan and UBSan (if possible) would (of course) cover more bugs than just one sanitizer in isolation. (There is also LeakSan). Example flags: -fsanitize=address,undefined,leak Many, many years ago I also used windows-specific tools (DCRT, debug C runtime; and something called gflags.exe), and those tools worked well on MSVC to detect out-of-bounds writes and other memory abuses/errors. I'm not sure what the current windows state-of-the-art memory tooling is named and what form it takes.
  • 0 Votes
    11 Posts
    2k Views
    O
    @grainyblob Might be a weird question but I am quite new to coding, in the image, how did you get those rounded corners while applying acrylic? because I though corners were limited to 8px on windows 11 due to dwm, but it seems you have gone over this limit, I'm asking because I want to make a program that is similar to macos tahoe 26 spotlight search but for windows 11 using this effect.
  • download 1GB file using QNetworkAccessManager, QN..Request, QN..Reply

    Unsolved
    3
    0 Votes
    3 Posts
    87 Views
    Christian EhrlicherC
    Also when downloading 1GB I would save it to a QFile as soon as some parts arrived - connect https://doc.qt.io/qt-6/qiodevice.html#readyRead and save the already downloaded parts.
  • Using QFileSystemModel, QTreeView, and QSortFilterProxyModel

    Solved
    30
    0 Votes
    30 Posts
    742 Views
    Z
    QLZTreeView - see above Header: class QLZTreeView : public QTreeView { Q_OBJECT public: explicit QLZTreeView(QWidget* parent = nullptr); ~QLZTreeView(); protected: void renameCurrentObject(QModelIndex coCurrentIndex); void deleteCurrentObject(QModelIndex coCurrentIndex); void closeEditor(QWidget* editor, QAbstractItemDelegate::EndEditHint hint) override; private slots: void customContextMenu(const QPoint& point); }; QSortFilterProxyModel - is standard Qt class QLZFileSystemModel - see above Header: class QLZFileSystemModel : public QFileSystemModel { Q_OBJECT public: explicit QLZFileSystemModel(QObject* parent = nullptr); ~QLZFileSystemModel(); protected: Qt::ItemFlags flags(const QModelIndex& index) const override; }; main.cpp - and that's all. int main(int argc, char *argv[]) { QApplication app(argc, argv); LZImageViewerTest window; window.show(); return app.exec(); }
  • QSortFilterProxy sorting works on Linux but fails on Windows

    Unsolved
    6
    0 Votes
    6 Posts
    160 Views
    GrecKoG
    @Seb-Tur This might be due to this then : https://qt-project.atlassian.net/browse/QTBUG-141830
  • Iterating shared QMap on multiple threads

    Solved
    18
    0 Votes
    18 Posts
    336 Views
    sierdzioS
    I guess it's also an option to use QMap::find() to get a const iterator which will not be a copy of the data, unless I misremember stuff.
  • qt5.15.2 QPdfWriter fails to output embedded fonts in PDF

    Unsolved
    14
    0 Votes
    14 Posts
    231 Views
    L
    Windows 7 support ended January 14th, 2020,Yes, Currently, many old computers are still running Windows 7 and have not been upgraded to Windows 10 or above
  • Updating bindable property from another thread

    Unsolved
    3
    0 Votes
    3 Posts
    94 Views
    T
    @IgKh Thanks! Good to know that this will work. It is very wasteful... why spawn a potentially new thread whose only job is schedule something on a completely different thread and immediately end? It's just a simplify example. In my app, data need to be fetched from a 3rd party library in another thread to not lock up the main one, and updateBar would be much more complicated in actuality. Note that this example sticks to the default connection strategy - this way if you call updaBar from the same thread as this it will execute directly without overhead, and if you call it from another thread it will schedule the lambda for execution on the correct thread's event loop. Good point! Though, when I was writing this, I only considered the need to be called in another thread, so I must have been a bit tunnel vision.
  • Qt 6.9.3, 6.10.1 on Mac: QMAKE_APPLE_DEVICE_ARCHS="arm64" but QT_ARCH reports "x86_64"

    Unsolved
    3
    0 Votes
    3 Posts
    75 Views
    V
    Hi, happy New Year! It's M1. I can't build a working app on M1 at all, neither for x64 nor for arm64, and I suspect something is malfunctioning (as opposed to just wrong project settings). It might be new with the recent Xcode update a few weeks ago.