Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.7k Topics 457.9k Posts
  • How to detect and enable dark mode?

    Unsolved
    3
    0 Votes
    3 Posts
    2k Views
    E
    Qt itself does not contain a portal to the existing GTK themes. There are lookalikes like AdwaitaQt, Breeze, and many of Kvantum's themes, but none of them actually get their data from the current GTK theme. This is the closest you will get without doing any work yourself. And it sucks.
  • Prevent multiple TCP segments in post request

    Unsolved
    30
    0 Votes
    30 Posts
    5k Views
    V
    Here is from controller manual: [image: a9a9ff40-3e1d-4ff4-97f1-02de96ccbcc9.png]
  • Cant run Qmediaplayer Error: "Secure connection setup failed."

    Unsolved
    4
    0 Votes
    4 Posts
    349 Views
    SGaistS
    Do you have OpenSSL in your snap package ?
  • Playing RTP stream on Windows with Qt 6.2

    Unsolved
    5
    0 Votes
    5 Posts
    2k Views
    SGaistS
    Just found out this answer from Lars. Basically full cross-platform support for rtp/rtsp may come after 6.2. One possible alternative is to rebuild QtMultimedia to use GStreamer.
  • Bug when building 6.2

    Unsolved
    2
    0 Votes
    2 Posts
    247 Views
    VRoninV
    @MatrixMagic said in Bug when building 6.2: F:\qt_6\qtbase.\bin\qt_setup_tool_path.bat I think you have an extra . after qtbase that you don't have anywhere else
  • How to add a Backrgound Image on my QMainWindow

    Solved
    8
    0 Votes
    8 Posts
    1k Views
    V
    @Bonnie Alright! When I change my Background Image it works! Thanks for your answers all!
  • Transparency does not work on Qt 5-5.15.2-1

    Solved transparency
    5
    0 Votes
    5 Posts
    4k Views
    A
    @Banjo-0 @LadderOperator I am facing this issue on macOS, on Windows transparency works fine. Are you able to fix the issue.
  • QNetworkReply problem with error

    Unsolved
    11
    0 Votes
    11 Posts
    3k Views
    JonBJ
    @vin212 Well at least this is better! :) Though you still say nothing about where you put this, so it's anyone's guess what still does not work. Qt's network example for "Fortune" are the place to start. I would suggest you look at Fortune Client Example. I would copy that code, or at least the parts of it which deal with setting up the connection and the signals. Get that working first as your "base", and go from there.
  • 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
    677 Views
    VRoninV
    @bsomervi Tools->Options->Kits->Add
  • Form setting preferred size

    Unsolved
    5
    0 Votes
    5 Posts
    589 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
    893 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
    222 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
    143 Views
    No one has replied
  • How do I build MySQL driver for ARM-64 on MacOS?

    Unsolved
    6
    0 Votes
    6 Posts
    782 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
    314 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
    505 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
    450 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