Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.6k Posts
  • General question about the retranslate function when loading in .ui from Qt Designer

    Unsolved
    2
    0 Votes
    2 Posts
    228 Views
    SGaistS
    Hi, Yes it does. It's called automatically when you load a new translator. If you want to implement something similar for a non Designer based widget, see the Prepare for language changes chapter in Qt's documentation.
  • This topic is deleted!

    Unsolved
    6
    0 Votes
    6 Posts
    46 Views
  • Connect with MySQL Database MacOs Ventura 13.4

    Solved
    13
    0 Votes
    13 Posts
    3k Views
    SGaistS
    @BushyAxis793 one last thing: making your root account available on any and all point of access of your MySQL server is a wrong idea. You should rather create a dedicated user that has access to a specific database for that purpose.
  • QGraphicsView doesn't allow to scroll to added content

    Solved
    3
    0 Votes
    3 Posts
    335 Views
    GilboonetG
    @JonB Thank you, what you said helped me find what I was doing wrong : I did set the GraphicsView's sceneRect width and length properties. Setting them to 0 make it work as I needed. The screenshots are what I had as view, on the first one the scale as 100% and there are GraphicsItems to the left but no scrollbars. The second screenshot is at scale 30%.
  • Can not read from QTableWidget

    Solved
    18
    0 Votes
    18 Posts
    3k Views
    Christian EhrlicherC
    @Raul200000000009 said in Can not read from QTableWidget: Any ideas? Take a look into the QString documentation would be a good start.
  • Best approach to setting cells in table widget

    Unsolved
    2
    0 Votes
    2 Posts
    257 Views
    JonBJ
    @Perdrix Code is fine. Not sure what your question is. If you identify the row by comparing the text of one column against what you are looking for that's OK. Then you set each column's item to some text that's OK. If, for example, there were other magical calls, such as "set a whole row of columns to this list of values" then it would be documented, but it isn't.
  • What is the way to search for fonts in Font atlas in QT Source Code?

    Solved
    2
    0 Votes
    2 Posts
    208 Views
    C
    @mirro QFontDatabase
  • How to keep showing the QCombobox popup

    Solved
    9
    0 Votes
    9 Posts
    4k Views
    R
    @Abderrahmene_Rayene Thank you! The problem solved. Have a nice day!
  • Debug with QSignalSpy a timer object causing crashes

    Solved
    17
    0 Votes
    17 Posts
    4k Views
    G
    @JonB It looks like the crash is gone, thanks for the help.
  • All .h files have a warning for Q_OBJECT

    Solved
    16
    0 Votes
    16 Posts
    6k Views
    Chris KawaC
    @nslw Then replace -Wno-inconsistent-missing-override with -Wno-suggest-override in the settings I mentioned.
  • Sending array from cpp file to QML file

    Solved
    4
    0 Votes
    4 Posts
    407 Views
    serkan_trS
    @Mesrine I guess understand. I will access the QML side in the form of a direct directory in the form of array[0]. thanks for helping.
  • Multiple data in QT Signal

    Unsolved
    7
    0 Votes
    7 Posts
    609 Views
    JonBJ
    @Xav12358 So you have it working now, right? I have no idea about the QtCore.SIGNAL("...") syntax you are trying to employ, never used it and would not use it. I tried with your original syntax involving self.emit(SIGNAL("item_signal(str, QImage)"), "hello", QImage()) and got the same error as you about str needing to be registered. Threw that away and replaced with "proper"/"normal" syntax: self.item_signal.connect(self.new_image_callback) ... self.item_signal.emit("hello", QImage()) and all is well.
  • QEXPECT_FAIL with Global Test Data

    Solved
    5
    0 Votes
    5 Posts
    1k Views
    P
    @Paul-Colby It is unfortunate that a global data index is not available, as that would have solved the issue that I was having. I went ahead and implemented the third option. I may revisit how I am loading the files in the future to rewrite the test_data functions to only include the data that I need.
  • Shared library on windows fails when using moc

    Solved
    41
    0 Votes
    41 Posts
    13k Views
    MesrineM
    @Christian-Ehrlicher Thats a good point. Thanks! Using the same definition for both libraries if not included correctly the headers could define the export on the symbol that should have an import statement. This is not completely clear to me so Let me try. I let you know :). Yes, that was the problem. Many thanks.
  • Debug messages

    Solved
    6
    0 Votes
    6 Posts
    609 Views
    PerdrixP
    @JoeCFD Yes, that was the problem Adding the proposed code fixed the problem.
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    2 Views
    No one has replied
  • Contour plot; VTK;qwt?

    Unsolved
    2
    0 Votes
    2 Posts
    215 Views
    JoeCFDJ
    @zhaiyg I guess qwt is made mainly for 2D. VTK has much more for 3D rendering.
  • qmetamethod, how to use after the changes?

    Solved
    4
    0 Votes
    4 Posts
    1k Views
    TomZT
    ok, I know how to do this but its really really ugly. It essentially is 2 sets of 10 calls to invoke in my sourcecode and some logic to decide which of the invoke() methods I actually call. I have 10 calls based on the amount of arguments there are. So, Qt is awesome it deprecated the methods only to force me to write 10 of them.. Then the invoke returns false if you pass in a default-constructed QMetaMethodReturnArgument which indicates 'void'. No, you have to call it without that argument if the method returns void. So... Yeah, another set of 10 calls.. I'm hoping I missed something, because this is beneath Qt
  • Passing variable-length args in container for QMetaObject::invokeMethod

    Unsolved
    8
    0 Votes
    8 Posts
    1k Views
    TomZT
    ok, I know how to do this but its really really ugly. It essentially is 2 sets of 10 calls to invoke in my sourcecode and some logic to decide which of the invoke() methods I actually call. I have 10 calls based on the amount of arguments there are. So, Qt is awesome it deprecated the methods only to force me to write 10 of them.. Then the invoke returns false if you pass in a default-constructed QMetaMethodReturnArgument which indicates 'void'. No, you have to call it without that argument if the method returns void. So... Yeah, another set of 10 calls.. I'm hoping I missed something, because this is beneath Qt
  • Can QPainter.drawText rotate text ?

    Solved c++ qt svg
    4
    0 Votes
    4 Posts
    989 Views
    GilboonetG
    @TomZ Thank you, I follow the order you mentioned and it works fine. if (doSVG) { painter.setFont(fNum); painter.setPen(pNum); painter.save(); painter.translate(c.toPointF()+ b.toPointF() +tit->pos()); painter.rotate(radToDeg(ra)); painter.drawText(- ti->boundingRect().width()/2, -2, QString::number(n)); painter.restore(); } [image: f90e196d-9f24-4761-b97f-8be48db48754.png]