Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.7k Posts
  • 0 Votes
    4 Posts
    8k Views
    C
    [quote author="avallabh88" date="1421436399"]Thanks for your reply. Do you know how I can compile the library with my current compiler? [/quote] If you have the source...
  • [SOLVED] QToolBar custom position

    4
    0 Votes
    4 Posts
    2k Views
    UndeadBlowU
    [quote author="Andre" date="1421412821"]You can also just add a QToolBar widget directly on your widget. Just not from Designer. QToolBar is just a widget, and it can be placed in a layout like any other widget*. *) Well, mac... I don't know.[/quote] Yep, you are right, I did it as I want, thank you.
  • Minimized windows shown as small rectangles

    1
    0 Votes
    1 Posts
    609 Views
    No one has replied
  • Connection signals/slots of a sublcass

    2
    0 Votes
    2 Posts
    562 Views
    C
    My Bad, Accidentally redeclared in the "colorChanged," signal in the RGBWheel class delcration.
  • How to statically link a Qt application on windows?

    6
    0 Votes
    6 Posts
    3k Views
    C
    Which static library? Qt? If yes, you have to build it yourself. It is not available in the Qt SDK. I have already provided the link for building Qt on Windows.
  • Paint in a Widget.

    12
    0 Votes
    12 Posts
    4k Views
    F
    Thanks for your attention I upload the new code, with the change that you said. Nothing happend, its continuos without paint when I want. http://we.tl/CkREoMkpsO Any other ideas? Thank you very much for your attention
  • How to undo last lineto() in a QPainterPath

    2
    0 Votes
    2 Posts
    475 Views
    S
    I found a solution but it is very dirt. I save the last state of the QPainterPath in a temporare variable and overwrite the QPainterPath.
  • How to iterate all sub-folders of a directory?

    4
    0 Votes
    4 Posts
    6k Views
    X
    Sorry guys, I was not thinking right. I figured it all out. Here is what I and I did use QFileSystemModel. @void MainWindow::on_actionExport_files_triggered() { QModelIndex index = ui->treeView->currentIndex(); QString rootDir = dirModel->filePath( selectedIndex ); QDirIterator iter( rootDir, QDir::Dirs | QDir::NoDotAndDotDot); while(iter.hasNext() ) { qDebug() << iter.next(); } ........ }@
  • 0 Votes
    4 Posts
    1k Views
    C
    One more thing: If you are only using Windows machines both on the sending and receiving end, you can also use QLocalSocket. I don't have any speed comparison with QtTcpSocket but it may be a tad faster than a TCP connection.
  • [Solved] Error messages while using dll

    4
    0 Votes
    4 Posts
    1k Views
    S
    Thanks for your help, I was able to sort it out. Indeed it is a problem in the dll where I had expected the problem to be in the software programmed by a newbie (that would be me ;) ). Have a nice weekend, Stephan
  • Qt Creator TODO plugin Tutorial

    todo plugin qt creator
    10
    0 Votes
    10 Posts
    12k Views
    L
    I can't get it to scan .js files - does anyone know howto do that?
  • [solved] How to expand widget in other widget without using layout?

    4
    0 Votes
    4 Posts
    2k Views
    N
    Raven-worx: setting widgetResizable to true allows to resize QScrollArea to it child widget (I assume that from docs). I want to resize that area to it's parent. Andre: Previously I was thinking about writing filter, but creating my own class that inherits QWidget was the best solution, thanks.
  • How to lock combobox scrolling while scrolling in scrollarea?

    5
    0 Votes
    5 Posts
    3k Views
    raven-worxR
    hardly believable. If that's really the case then there must be something else which sets the focus in your code. You should set a breakpoint for the focus-in event and check from where it comes. You can post the stack trace here then if you like.
  • Focus does not change on button click

    7
    0 Votes
    7 Posts
    3k Views
    raven-worxR
    what about something like this (not tested though): @ Item { width: 640 height: 480 property alias button1: button1 function evaluateTextField(textField) { console.debug(textField.objectName); // do evaluation of text field if( evaluated ) set_number_q.set_number(text) } TextField { id: text1field objectName: "text1field_object" x: 100; y: 100; width: 400; height: 75; text: qsTr("") font.pixelSize: 26 onEditingFinished: evaluateTextField(text1field) } RowLayout { anchors.centerIn: parent Button { id: button1 text: qsTr("Press Me 1") onClicked: set_number_q.print_number(); } } } @
  • How to randomly display non-English characters from UNICODE?

    3
    0 Votes
    3 Posts
    676 Views
    N
    Thank you for the hint. I will implement this. Thanks, Daniel
  • Cannot read complete data, bytes available != actual bytes read

    3
    0 Votes
    3 Posts
    1k Views
    raven-worxR
    i don't know which data you are receiving on the socket, but count the read bytes directly and not from the string. Try this: @ qint64 nBytesAvaialble=m_pSocket->bytesAvailable(); //<-- not using qint64 may cause possible loss of int-data here ... QByteArray readData = m_pSocket->read(nBytesAvaialble); // or use readAll() qint64 readBytes = readData.size(); m_qstrNextMesssage.append(readData); @
  • QtScript disconnect something connected from C++ code

    1
    0 Votes
    1 Posts
    467 Views
    No one has replied
  • ListView resets delegates that have disappeared from view

    3
    0 Votes
    3 Posts
    647 Views
    A
    It's a feature, not a bug. Please don't save state in delegates. Instead, save state in the model itself
  • Which arguments are understood by Qt?

    3
    0 Votes
    3 Posts
    803 Views
    A
    For listing the available styles, you can ask QStyleFactory. There is no pre-built creation of help output, though there are libraries for Qt to help out with that.
  • QTableView Multiple Editing Cell

    6
    0 Votes
    6 Posts
    2k Views
    E
    Thanks very much I will try that one it sound as a good idea. Best Ernesto