Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.7k Posts
  • How To Save And Load A Qt Window to file?

    Unsolved
    13
    0 Votes
    13 Posts
    2k Views
    artwawA
    @mpergand Yes however, if you read QDataStream docs, versioning of the data is advised, so it is not THAT terrible. Main problem I see is sequential access to the data.
  • Drag and drop can not work on Ubuntu(Virtual Machine).

    Solved
    9
    0 Votes
    9 Posts
    832 Views
    Pablo J. RoginaP
    @VikiWang said in Drag and drop can not work on Ubuntu(Virtual Machine).: it worked fine! Great, so please don't forget to mark this post as solved!
  • Howto push GST thread into QT Main Thread

    Unsolved
    2
    0 Votes
    2 Posts
    418 Views
    jsulmJ
    @monkfood said in Howto push GST thread into QT Main Thread: a callback is called that wants to send data through a websocket living in the Main thread. Then don't use that websocket in the thread, but emit a signal in this callback instead. Connect this signal to a slot in main thread where you then use the websocket.
  • List of Widget, how to

    Unsolved
    4
    1 Votes
    4 Posts
    185 Views
    Pablo J. RoginaP
    @cebuger said in List of Widget, how to: perfect thanks! Did it work? If so please don't forget to mark your post as solved!
  • QFrame border has differend line width but frameShadow is plain

    Unsolved ui design border bug
    2
    0 Votes
    2 Posts
    626 Views
    jsulmJ
    @Vasiliy-Isaikin said in QFrame border has differend line width but frameShadow is plain: Why? It looks like you're not using layouts? You should arrange your widgets in layouts, so they get sized and positioned properly.
  • Compiling errors after loading old project

    Solved
    17
    0 Votes
    17 Posts
    1k Views
    JonBJ
    @Dy3zz Both @Christian and @Ehrlicher ? ;-)
  • Setting "ItemisAutoTristate" on a QTreeWidgetItem disable it.

    Solved
    3
    0 Votes
    3 Posts
    351 Views
    M
    That fixed the issue, didn't know setFlags() reset existing flags, i feel dumb now... Thank you !!! :)
  • Problem configuring QT in ubuntu

    Solved
    4
    0 Votes
    4 Posts
    370 Views
    jsulmJ
    @Dy3zz said in Problem configuring QT in ubuntu: But do not know how to config it Compiler is usually auto-detected. If this is not the case for some reason, go to Compilers tab and make sure it is there, add it if not. Then go to the Kit and select that compiler in the Kit.
  • The best way to encrypt data.

    Unsolved
    3
    0 Votes
    3 Posts
    376 Views
    J
    @Christian-Ehrlicher said in The best way to encrypt data.: Qt has no built-in library for this but there is e.g. qca or openssl I suppose it's good enough. Does it works on files or should I do read-encrypt-write? By the way - where do I store the encryption key (considering the user has an option to change it)? sorry, I don't quite understand QCA::PrivateKey seckey = QCA::KeyGenerator().createRSA(1024); if (seckey.isNull()) { std::cout << "Failed to make private RSA key" << std::endl; return 1; } QCA::PublicKey pubkey = seckey.toPublicKey(); // check if the key can encrypt if (!pubkey.canEncrypt()) { std::cout << "Error: this kind of key cannot encrypt" << std::endl; return 1; } seckey is randomly generated? so is pubkey ? In case of an embedded application the key is stored on the chip flash - out of unauthorized reach. In case of OS (Linux) - I wonder how it suppose to be handled?
  • Setting fixed values for height and width of array of widgets

    Unsolved
    17
    0 Votes
    17 Posts
    2k Views
    JonBJ
    @Swati777999 said in Setting fixed values for height and width of array of widgets: Edit: QMap works fine whereas QVector behaves in a weird way. At least, I am able to add myTable[ii] elements to the layout with the help of QMap container. For an array/QVector you must actively create enough room in the array to accommodate elements, through one of: myTables.resize(5); // allocates room for 5 elements in the vector, numbered 0..4 // or myTables.append(new QTableWidget()); // appends one element to the vector I did say to deal with why your code with QMap does not work in the first place before worrying about this....
  • Use gstreamer gtk signaling in QT application

    Solved
    7
    0 Votes
    7 Posts
    710 Views
    M
    @Christian-Ehrlicher to be honest, i have no idea what is about since I am unable to find any reference in the Qt Documentation. An on the web only some class diagram from Qt4. So i need to go with what I can find, learn, understand and then use. However, I value your input a lot and will read some more in the direction of QAbstractEventDispatcher and QEventDispatcherGlib.
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    6 Views
    No one has replied
  • QThread::start: Thread creation error (Operation not permitted)

    Solved
    2
    0 Votes
    2 Posts
    1k Views
    A
    It was docker issue guys. Do not run fedora:latest container on Centos7 host. Downgrading to fedora:34 helped. I found similar issue here https://bugs.archlinux.org/task/69576. Important symptom - ldd myapp in the container returned "ldd: error: you do not have read permission for 'myapp'". And the threads did not start. While the previous images work well. So I checked what has changed except my code and dependencies, and the only thing was fedora:latest became 35.
  • CustomWidget Alignment Center?

    Unsolved
    2
    0 Votes
    2 Posts
    163 Views
    jsulmJ
    @IknowQT said in CustomWidget Alignment Center?: What can be done to become a center? Use layouts
  • ubuntu 20.04 can not run qt creator 6

    Unsolved
    2
    0 Votes
    2 Posts
    231 Views
    jsulmJ
    @neeme Install libopengl0 package and try again
  • Qt Vs Tool error in set qt versions

    Unsolved
    1
    0 Votes
    1 Posts
    86 Views
    No one has replied
  • QTextStream write to QString ignore endl

    Solved
    2
    1 Votes
    2 Posts
    288 Views
    JKSHJ
    Hi, and welcome! @semicloud said in QTextStream write to QString ignore endl: 1\n2\n3 That is correct. \n is the string value of endl. This is the same debug output as qDebug() << QString("1\n2\n3");. What I want is as follows : 1 2 3 You can do one of the following: Write msg to a text file and open it with a text editor. Put msg in a QLabel or QTextEdit. Convert msg from a QString to a const char*: qDebug() << msg.toUtf8().constData();
  • 0 Votes
    1 Posts
    406 Views
    No one has replied
  • QMQTT Client stuck connecting.

    Unsolved
    5
    0 Votes
    5 Posts
    728 Views
    Pablo J. RoginaP
    @RFinchMinicam said in QMQTT Client stuck connecting.: I've not used QT before You may want to take a look and try this client example. You'll see there are no infinite loops but the usage of Qt's signals & slots instead.
  • QHBoxLayout not working properly

    Unsolved
    4
    0 Votes
    4 Posts
    316 Views
    SGaistS
    Hi, @Batyu said in QHBoxLayout not working properly: m_HBoxLayout = new QHBoxLayout(parent); m_VBoxLayout = new QVBoxLayout(parent); Passing a parent to a layout automatically applies the layout to the parent.