跳到內容

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.4k 主題 456.4k 貼文
  • transparent Widget

    Unsolved
    24
    0 評價
    24 貼文
    20k 瀏覽
    JoeCFDJ
    @JoeCFD My solution with mask for transparency works for LXQt desktop, but not for Gnome Desktop of Ubuntu. Reset of mask regions is wrong sometimes. Added this issue to the bug report.
  • close/kill another Windows process which is started by run a .bat in Qt app

    Unsolved
    19
    0 評價
    19 貼文
    2k 瀏覽
    JonBJ
    @Vijaykarthikeyan It should delete terminate the process created on the QProcess object, i.e. just what you would expect.
  • Placing QPdfView-Widget in Qt-Designer

    Solved
    5
    0 評價
    5 貼文
    859 瀏覽
    Pl45m4P
    @beredis said in Placing QPdfView-Widget in Qt-Designer: The QPdfView widget is part of the Qt PDF module and is not available by default in the Qt Designer’s widget box. However, you can still use it in your custom main window with a workaround. Here’s how you can do it: Place a plain QWidget in your form where you want the QPdfView widget to be. Right-click on the QWidget and select “Promote to…”. In the “Promoted Widgets” dialog, you’ll need to enter the name of the class you want to promote to (QPdfView) and the header file (QPdfView). Once you’ve added the promoted class, click “Add” and then “Promote”. This will tell Qt Designer to treat the plain QWidget as a QPdfView widget at compile time. Remember to include the necessary headers and link against the PDF module in your project file. Do you think this was needed now? This topic is solved and already contains a solution on how to promote a widget.
  • Qt Designer/Creator/Design Studio - Which Should I Use?

    Solved
    7
    0 評價
    7 貼文
    16k 瀏覽
    S
    that sounds like it could use some optimization. Some reworks when porting to C++ / Qt :) But definitely use Qt's Multithreading technologies, otherwise you will block the main GUI thread and make the window unresponsive. The algorithm has parameters that can be tweaked, and there are also different levels of precision that can be attained (another parameter). So 100 times less precise gets completed in approximately 0.1 seconds, however, still a problem on a slow computer, or with a user not anticipating the wait. I haven't used multithreading, but that sounds like the perfect solution. I can disable the 'request' button until the spawned thread completes. I just completed my C++ course. A different algorithm using C++ might be 1000 times faster. I am already anticipating that in the translation there is much that can be improved upon overall in the way of performance. My app is heavy on string processing. All of those calls to .NET and making copies of strings in the VB code have to be costly. Thanks for those extra links. My app uses a lot of color.
  • Qt6: Disable drawing of default background for QTreeView items

    Unsolved
    6
    0 評價
    6 貼文
    446 瀏覽
    M
    Seems I misunderstood the assignment)
  • Slicer 3D GUI edit

    Unsolved interface dock widget positioning
    2
    0 評價
    2 貼文
    499 瀏覽
    Pl45m4P
    @Santiago_Pendon said in Slicer 3D GUI edit: it would be great if the widget will appear on the top automatically. AFAIK there is no way to set a position or order of QDockWidgets in some DockArea. I think they are ordered the way they are added. So to have your own QDockWidget on top, you have to add it before everything else, which might be tricky.
  • macOS->Microphone Permission (request permission Message won't popup)

    Solved
    8
    0 評價
    8 貼文
    730 瀏覽
    S
    @J-Hilk add_executable(client client_main.cpp client_main_window.cpp client_manager.cpp client_chat_window.cpp chat_protocol.cpp chat_line.cpp ) target_link_libraries(client PRIVATE database_library) qt_add_resources(client "images" PREFIX "/images" FILES send_icon.png ) set(MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist) set_target_properties(client PROPERTIES MACOSX_BUNDLE ON) This is the CMake file related to the executable I am having prob ton have access to the Microphone. I did setup the Info.plist file.
  • QTcpServer as HTML Server

    Solved qtcpserver html qt5.14.2 web server
    3
    0 評價
    3 貼文
    456 瀏覽
    R
    The server page was not loading and the issue was I was using the server's newConnection() signal to immediately write the html page to the client. But you have to wine and dine the client first. I ended up connecting the newConnection() signal to a set up function: void Server::handleConnection() { QTcpSocket* client = nextPendingConnection(); //client->setSocketOption(QAbstractSocket::KeepAliveOption, 0); QObject::connect(client,&QTcpSocket::readyRead,this,[=](){ handleRequest(client); }); } You can then write the HTML content to the client in handleRequest()
  • QT 5.15.3 not available in Maintenance tool. Tips to install?

    Unsolved
    5
    0 評價
    5 貼文
    685 瀏覽
    JoeCFDJ
    @fontcolorhelp For Ubuntu, try to find qt deb files and download them to install. Ubuntu 22.04 has Qt 5.15.3.
  • How do I freeze the first row in a QTableWidget?

    Unsolved tablewidget
    4
    0 評價
    4 貼文
    852 瀏覽
    JonBJ
    @SGaist said in How do I freeze the first row in a QTableWidget?: use the answer arrows rather than the quick answer box. Thanks, I discovered that after the first time I used it... :)
  • Call invokeMethod passing argument by (no const) reference - Q_ARG(Type&, value)

    Solved
    6
    0 評價
    6 貼文
    462 瀏覽
    N
    @Christian-Ehrlicher Ok, i'm going to use a signal/slot like solution. It's both more clean and safety.
  • 0 評價
    6 貼文
    380 瀏覽
    JoeCFDJ
    @Christian-Ehrlicher Good point. Busy with a release and no time to check it out. The bug report has been marked as Critical by Qt guys.
  • QTHREADS requests

    Solved
    10
    0 評價
    10 貼文
    555 瀏覽
    elicatE
    Hello, after reading your comments and performed multiple tests I solved it using the class QtConcurrent I called a slot from html/js which contains the start of the process where the loop is executed Solt Call method with process lancheur QtConcurrent void EngineIndexHtml::execLauncherBackupJob(QJsonObject jsonParameter) { extern void execLauncherJob(EngineIndexHtml * EngineHtmlObj, QJsonObject jsonParameter); QtConcurrent::run(execLauncherJob, this, jsonParameter); } Part of method execLauncherJob where EngineHtmlObj is mother class where there is declare signal for (int i = 0; i < arrayDataRowLauncher.size(); i++) { . . . . emit EngineHtmlObj->elabCheckStatusLauncher(jsonObjectDataRowLauncher); goLauncher(jsonObjectDataRowLauncher, strOriginFolder, startThread, endThread, iCoreIndex); . . . . } Now is all ok. Thanks to everyone who supported me and put up with me
  • Qml and MediaPlayer

    Unsolved
    6
    0 評價
    6 貼文
    527 瀏覽
    JoeCFDJ
    @mrdebug someone said state change is ok. https://forum.qt.io/topic/77694/detect-when-webcam-is-unplugged/13?_=1714657097024 And you are using FFmpeg, not gstreamer.
  • How to create relation between main ui and different cpp/h files?

    Unsolved
    5
    0 評價
    5 貼文
    385 瀏覽
    Pl45m4P
    @Rozerin-YILDIZ said in How to create relation between main ui and different cpp/h files?: There will be just one .ui file (mainwindow.ui) The UI file is not directly connected to your class structure... As you might know, you don't need any *.ui files at all. Everything can be done by code. I want to split this issues (if it makes sense) Make no sense to me to split the MainWindow content into multiple classes / files. If it's shown (used only) in your MainWindow widget, what's wrong with having the code there? QMainWindow after all is just another widget, that you can fill with content. As I've said in your other topic, you can make widget "factories" to create and return the new widget to your main window. But this is also not needed. And if you subsclass some widget, you have your own separate class (files) anyway, which you include in your MainWindow header or code file.
  • Question about QThread object deletion

    Solved threading oop c++
    11
    0 評價
    11 貼文
    1k 瀏覽
    jsulmJ
    @Kirill-Gusarev See @SimonSchroeder explanation and also read https://doc.qt.io/qt-6/threads-qobject.html
  • Problem with Microphone Permission Request using QMicrophonePermission and info.plist file

    已移動 Unsolved
    2
    0 評價
    2 貼文
    177 瀏覽
    jsulmJ
    @SlayH Please don't post problem topics in "Announcements" forum! I will move it.
  • Implementing / reimplementing "close event"????

    Unsolved
    19
    0 評價
    19 貼文
    1k 瀏覽
    A
    @AnneRanch partially SOLVED Using option 1 , which passes the " parent" . Parent children contain the required "action" - re -tile the QMdiArea subwindows. option 1 SettingsDialog *SD = new SettingsDialog**(this)**; option 2 SettingsDialog *SD = new SettingsDialog();
  • I have a QTableWidget but need to remove horizontal header and vertical header data

    Solved table widget
    2
    0 評價
    2 貼文
    624 瀏覽
    C
    To hide the row and column header row entirely: tableWidget->horizontalHeader()->setVisible(false); tableWidget->verticalHeader()->setVisible(false);
  • Detect when webcam is unplugged

    Unsolved
    13
    0 評價
    13 貼文
    5k 瀏覽
    JoeCFDJ
    @mayamail Works? Nice! What is your Qt version? And the class QCameraViewfinder does not exist any more in Qt6.