Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.4k Topics 456.4k Posts
  • qt d3d rendering failed

    Unsolved
    1
    0 Votes
    1 Posts
    103 Views
    No one has replied
  • How to change cordinate sistem in QGraphicsItem

    Unsolved qt6 qgraphicsitem qchart
    4
    0 Votes
    4 Posts
    791 Views
    Pl45m4P
    Either I haven't figured out, what you are doing or it's complete nonsense (esp. the boundingRect) Maybe you can add the rest of your code and a screenshot of how your result looks. @ugo_ said in How to change cordinate sistem in QGraphicsItem: I want to plot my custom item inside a chart. Are you talking about QChart? So you have a QChart and want your item in your chart?!
  • How to split the libtorch forward method's output?

    Unsolved
    4
    0 Votes
    4 Posts
    442 Views
    JonBJ
    @donkey007 No. Look at the torch::Tensor documentation.
  • Show text on QToolButton instead of icon?

    Solved qtoolbutton qaction
    9
    0 Votes
    9 Posts
    3k Views
    SGaistS
    @JoeCFD from the looks of it, it could be an Ubuntu specific bug.
  • 0 Votes
    3 Posts
    649 Views
    bibasmallB
    The problem was that every child widget of the native widnow got it's own window descriptor (HWND), so, for example, if I hit the menubar, in nativeEvent I saw that the message had a different descriptor than the main window had. This is what solved my problem: QApplication a(argc, argv); a.setAttribute(Qt::AA_DontCreateNativeWidgetSiblings); //... CEventFilter e{ &w }; a.installNativeEventFilter(&e);
  • Image can't Show in Page2

    Solved pyqt6 software
    9
    0 Votes
    9 Posts
    1k Views
    Pl45m4P
    @AlbertRicky said in Image can't Show in Page2: so what should I use to make two pages Change the secondWindow type to QWidget (using QMainWindow there is weird) and make it a page of QStackedWidget. You can design that widget with your QtDesigner and setup the layout with the label that should hold your image later. Assign your result image with your detections to the label, when you have processed the source image and flip the pages with your buttons. This can also be done in-place. Then you dont need a QStackedWidget. If you don't need to switch back and forth multiple times, but swtich one time to show the result, you could also "replace" the image on your current label, when clicking the button. But I dont know, what else you what to do on that second page widget.
  • QEffectSound with Qt6.3

    Unsolved
    5
    0 Votes
    5 Posts
    312 Views
    JonBJ
    @Alfredy As @Christian-Ehrlicher says. Two obvious possibilities: "File not found" for WAV file. What is the scope of QSoundEffect sound? I believe it has to remain in existence, sound.play() only starts playing the sound, not blocks while it plays?
  • How to clearly kill a mpi program which is launched by Qprocess?

    Unsolved pyqt5 qt5.7 mpi qprocess
    3
    0 Votes
    3 Posts
    1k Views
    S
    @JonB In command line, we usually kill a mpi program by killing one of the child processes. And I find this may be a bug of intel mpi on windows [ https://community.intel.com/t5/Intel-oneAPI-HPC-Toolkit/InteloneAPI-MPI-2021-2-0-behavior-on-Linux-and-Windows-differ/td-p/1290020 ]. Anyway, thanks for your reply.
  • how to include graphics.h and conio.h in Qt w c++ project

    Unsolved
    2
    0 Votes
    2 Posts
    254 Views
    SGaistS
    Hi, What is your exact issue ? Which project management system are you using ? qmake ? CMake ? Where do these files come from ?
  • How to hide/unhide QWidget on hover.

    Solved qvideowidget qwidget hover hide unhide
    6
    0 Votes
    6 Posts
    1k Views
    JoeCFDJ
    @Saviz #include <QApplication> #include <QMouseEvent> #include <QVideoWidget> class HoverVideoWidget : public QVideoWidget { public: HoverVideoWidget(QWidget *parent = nullptr) : QVideoWidget(parent) { setMouseTracking(true); // Enable mouse tracking to get hover events } protected: void enterEvent(QEvent *event) override { // Called when the mouse enters the widget setStyleSheet("background-color: lightblue;"); // Set the background color to light blue } void leaveEvent(QEvent *event) override { // Called when the mouse leaves the widget setStyleSheet(""); // Reset the background color to default } }; int main(int argc, char *argv[]) { QApplication app(argc, argv); HoverVideoWidget player; player.show(); return app.exec(); }
  • Simple loop to extract json of any value type

    Solved json extract data json reply
    1
    0 Votes
    1 Posts
    215 Views
    No one has replied
  • QPlugin failing to load

    Solved
    11
    0 Votes
    11 Posts
    377 Views
    ocgltdO
    @SGaist Well I solved it...for anyone else interested. Although my poodle.so compiled fine, I had not linked in the Dog_Base and Animal_Base classes to the .so. Again - NO error on compilation. But, when I tried to load the poodle.so it could not find the ctor for the base class - because it was not linked in to the library's .so Very strange error...but solved!
  • QMediaPlayer crashes in response to drop event

    Unsolved
    4
    0 Votes
    4 Posts
    341 Views
    SGaistS
    @jboyce in that case, you should check the bug report system to see if there's something there and if not, please open a new ticket providing your example.
  • const QObject* overload for QMetaObject::invokeMethod

    Unsolved
    6
    0 Votes
    6 Posts
    466 Views
    Christian EhrlicherC
    @Loic-B said in const QObject* overload for QMetaObject::invokeMethod: By using mutexes ? If you access an object from different threads then you have to apply correct locking. Nothing Qt specific but Qt has a nice page about thread synchronization.
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    3 Views
    No one has replied
  • Incorrect Bounding Rect?

    Unsolved qfontmetrics qpainter
    3
    0 Votes
    3 Posts
    628 Views
    CJhaC
    @Pl45m4 In this function I am painting on axis->labelPix which is a QPixmap. The axis->labelPix is then put in its correct position using QPainter in the paintEvent() of PlotWidget.
  • .pro file which creates one .so per .cpp

    Unsolved
    2
    0 Votes
    2 Posts
    111 Views
    W
    By the time you are doing that level of QMake, you may just want to switch to using CMake. It's much better documented and more widely supported, so it's generally much easier to do unusual things with it.
  • Form Layout and Vertical Layout combo doesn't work as expected

    Solved
    7
    0 Votes
    7 Posts
    1k Views
    N
    @t-vanbesien said in Form Layout and Vertical Layout combo doesn't work as expected: I'm new to Qt and perplexed with layout and form layout behavior. First off what is displayed in the Design tab of Qt Creator is not the same as when I execute the program. One possible reason for this discrepancy is that the size and position of the widgets in your layout may change when you run the program based on factors such as the size of the window, the size of the screen, or the user's preferences. Another reason for the discrepancy could be that the Design tab may not accurately reflect the layout rules specified in your code. For example, suppose you've set minimum or maximum sizes for your widgets, or you've set some widgets to stretch or expand to fill available space. In that case, the Design tab may not show the exact positioning of widgets and their size as it may be affected by these rules. Layout and Form layout are used to organize and position widgets in your application's user interface. The main difference between the two is that a Layout can be applied to any QWidget-based object, while a Form layout is specific to the QWidget-based forms created by Qt Designer. Layouts automatically arrange widgets based on predefined rules, such as horizontal or vertical alignment or grid layout. With layouts, you don't have to manually set the position and size of each widget, which makes it easier to create and maintain your user interface. On the other hand, form layout is a specific type of layout used to organize widgets in a dialog box or other form. Form layout allows you to align and position widgets in rows and columns, making creating professional-looking forms with a consistent layout easy. the Design tab is a preview of what your user interface will look like, but it may not accurately represent the final result due to factors such as user preferences or layout rules. Layouts and Form layouts are valuable tools for organizing and positioning widgets in your application, with Form layouts being specific to creating forms.
  • Hiow to idetify which .pro is missing the library ?

    Unsolved
    4
    0 Votes
    4 Posts
    288 Views
    JoeCFDJ
    @AnneRanch in your project dir type command: grep -RHi lBT_Config_Library to find which pro files include it is it this dir? Leaving directory '/home/nov25-1/BLUETOOTH/BT_FEB22_FEB24_WORK/RECOVERY/BLUETOOTH/SOURCE/CCC_SOURCE/terminal_SERIAL_BLUETOOTH_VER_1/terminal_SERIAL_BLUETOOTH/terminal_BLUETOOTH
  • Qt icon theme switch

    Solved qss icon theme stylesheets
    4
    0 Votes
    4 Posts
    4k Views
    SGaistS
    Sorry for the very late reply, would it be possible to have a complete minimal compilable project to be able to test your issue ?