Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.8k Posts
  • How to destroy COM object created by QAxObject?

    Unsolved
    8
    0 Votes
    8 Posts
    1k Views
    M
    @JonB : Yes, it's a mixed app as it relays onto some 3rd party libs that are only available in C#. Not nice, but without alternative for now... @hskoglund : I've been convinced that you were on to something until I learned, that Dispose-Pattern is very useful to free unmanaged resources immediately instead of wating for the garbage collector. But there is no way in C# for an object to destroy itself and free the used memory leaving nothing but a dangling pointer behind... I dug a little deeper into the topic and it seems, that this isn't Qt related. I tried the same, using only standard C++ and the ComBaseApi (combaseapi.h), and got pretty much to the same result. The COM objects reference count actually drops to zero as it is supposed. Here I learned tha when creating a COM object a Runtime Callable Wrapper (RCW) is created to own the object and hold a strong reference to it which could possibly prevent tha GC from doing it's job. I guess I will have a closer look on that...
  • C++ function QObject::connect with paramter QObject and function pointer ;

    Unsolved qobject c++
    10
    0 Votes
    10 Posts
    2k Views
    A
    @JonB Hi, sorry for the late reply. extacly, i already have signal parameter, only want to write generic mathod - which has its own inbuilt signal-side parameters for connect() but accepts the slot-side as parameters.
  • Is there any install of Qt Open Source for VS 2019 that works?

    Solved
    6
    0 Votes
    6 Posts
    666 Views
    VRoninV
    @bsomervi Tools->Options->Kits->Add
  • Form setting preferred size

    Unsolved
    5
    0 Votes
    5 Posts
    574 Views
    AxelViennaA
    As Bob64 said, setSizeHint(const QSize &) is the way to define a widget's preferred size. A widget's runtime size is also depends the widget's size policy. If the widget is held by a layout, the layout type and (if existing) other widgets and their sizes are also considered. This is why setting a size hint does not necessarily lead to predictable column sizes of your list view. In case you want that, you can set the column sizes directly by setColumnWidth(int column, int width). A user-friendly way to remember widget sizes for the next session is to store them in a QSettings object, which you read in your constructor and update in your destructor.
  • Stylesheet and QTabBar - which element is this?

    Unsolved
    3
    0 Votes
    3 Posts
    881 Views
    G
    I have the same problem too. try adding QTabBar { qproperty-drawBase: 0; } btw, if DockWidgets will be dragged, look this: topic/59450
  • Change cell contents before editing QTableWidget cell?

    Solved
    2
    0 Votes
    2 Posts
    220 Views
    eyllanescE
    @Publicnamer Use a delegate: class Delegate: public QStyledItemDelegate{ public: using QStyledItemDelegate::QStyledItemDelegate; void setEditorData(QWidget *editor, const QModelIndex &index) const{ if(QLineEdit *lineEdit = qobject_cast<QLineEdit *>(editor)){ lineEdit->setText("Foo"); } } }; tableWidget->setItemDelegate(new Delegate);
  • Stylesheet Quirks?

    Unsolved
    1
    0 Votes
    1 Posts
    139 Views
    No one has replied
  • How do I build MySQL driver for ARM-64 on MacOS?

    Unsolved
    6
    0 Votes
    6 Posts
    759 Views
    SGaistS
    Because there's no reason to have anything pre-built in the sources. I was thinking about the binaries installed using the online installer.
  • Connect closing dialog with a Qt List Widget

    Solved
    3
    0 Votes
    3 Posts
    306 Views
    D
    @mpergand It worked for me. I did this: void home::on_AddPeopleBut_clicked() { addpeople dialog(this); dialog.exec(); QStringList a; a=dialog.getList(); qDebug() << a[0]; } I printed the first element to test . it worked perfectly. Thanks!!
  • Button hover action

    Solved
    4
    0 Votes
    4 Posts
    496 Views
    D
    @JonB Thank you so much. I didn't know about whatsThis() :)
  • This topic is deleted!

    Unsolved
    3
    0 Votes
    3 Posts
    6 Views
  • How to add validation in column data in Qtableview?

    Solved
    4
    0 Votes
    4 Posts
    449 Views
    VRoninV
    @n-2204 said in How to add validation in column data in Qtableview?: so this will show () braces for all the data I mean not only -ve data in column That's exactly what this code does. I'd direct your attention on the if(value<T(0)) condition
  • Timestamp of saved Pixmap wrong

    Unsolved
    4
    0 Votes
    4 Posts
    327 Views
    T
    Creation time is the "old" time, modification time is the "new" time. In the Explorer, the "old" time is displayed. A new aspect: this only seems to affect Windows 7, not Windows 10.
  • can I change default fontsize?

    Unsolved
    3
    0 Votes
    3 Posts
    457 Views
    D
    Hi, thank you very much for the hint! Works great! [image: c4662aa0-2272-4225-8215-33ec0ac6b33e.png] The elements where I manually change font continue to work as before. ... and the elements, I don't want to use bother with font size use the new application font. Great! Thanks again - that's exactly what I was looking for :)
  • should QPushButton added to a QMessageBox be freed from memory?

    Unsolved
    2
    0 Votes
    2 Posts
    203 Views
    VRoninV
    @walle19 said in should QPushButton added to a QMessageBox be freed from memory?: Or maybe they are freed after the QMessageBox is deleted because adding them to the QMessageBox define them as children of the QMessageBox? Bingo! if they are sub-widgets then they are child and will be deleted with the parent
  • Black screen Map

    Solved
    15
    0 Votes
    15 Posts
    1k Views
    V
    My situation change, after many help and manipulation, my map change ! The map is not black but, is white ! [Edit] it's work ! After many help and research i fixe my probleme ! En effect, i add the line : qputenv("QT_OPENGL", "angle"); QCoreApplication::setAttribute(Qt::AA_UseOpenGLES,true); and i add many depedency ".dll" on my repertory. After this, my application work's Thank's for your help !
  • Compilation Problem with Qt 5.14.2

    Unsolved
    3
    0 Votes
    3 Posts
    333 Views
    P
    @raven-worx said in Compilation Problem with Qt 5.14.2: deploy with QtCreator to your phone and check the output messages Hello, Thanks for your feedback, but even with the logs I can't find the error. I can put you the logs I get from the application output with the command 'adb logcat'. Thanks [image: f4155279-9ec0-4f96-b6e1-b6e878440828.PNG] [image: 5585624c-f20e-4bcc-916e-f06416a12c24.PNG] [image: 08ba0c94-6b17-41cd-9e67-81d7ad59f6de.PNG] [image: 1aed6bc7-a60e-4ddc-8a71-f50bf37228ef.PNG]
  • About dialog in french.

    Solved
    5
    0 Votes
    5 Posts
    543 Views
    SPlattenS
    @jsulm , sorry, no idea, however, having removed that, now its fine, thank you.
  • 0 Votes
    23 Posts
    4k Views
    K
    @jsulm sorry i added that part its working thank you for your time and solution
  • Store of Wi-Fi scan SSIDs in QT file runtime?

    Unsolved
    6
    0 Votes
    6 Posts
    588 Views
    WaseeW
    @jsulm Hi; Your reply is appreciated! This code gave the SSIDs of all APs which are connected in future with the PC. If one time it stores the list then it does not update the new active wireless in the surrounding after saving in the TreeWidget why? After scanning these SSIDs is it possible to find MACs corresponding these SSIDs collected. Kindly help me regarding this. Thanks in advance!