Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.4k Topics 456.5k Posts
  • Problem about Dynamic Language Translation

    3
    0 Votes
    3 Posts
    3k Views
    S
    This "FAQ":http://developer.qt.nokia.com/faq/answer/how_can_i_dynamically_switch_between_languages_in_my_application_using_e.g_ contains a complete example that illustrates how you can implement dynamic translation. You can follow the setup from that example to see if that helps getting the translation to work.
  • [SOLVED] Slide Animation and Layout

    2
    0 Votes
    2 Posts
    13k Views
    J
    The problem was solved by removing all @ self.layout.setSizeConstraint(QtGui.QLayout.SetNoConstraint)@ and by adding a @ self.dashboard.label.setSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Ignored)@ just before the animation starts.
  • [SOLVED] connect to the server message

    14
    0 Votes
    14 Posts
    4k Views
    L
    If there are any basic questions which prevent you from understanding most of the documentation feel free to ask. That's way better than having tons of specific questions and stumbling from one problem to another.
  • About QScript

    2
    0 Votes
    2 Posts
    3k Views
    B
    See "ECMAScript Reference":http://doc.qt.nokia.com/latest/ecmascript.html and "ECMA-262 specification":http://www.ecma-international.org/publications/standards/Ecma-262.htm.
  • Problem with appending to QVector, when QVector is a private field.

    6
    0 Votes
    6 Posts
    3k Views
    P
    Thanks for advice:) I heard about QStringList but I had never an opportunity to use it. However, I'll check QStringList out and mayby I'll make a switch in my project :)
  • Trouble getting going with Bazaar

    5
    0 Votes
    5 Posts
    2k Views
    T
    Hugues fixed this in the master branch. Thanks for the report!
  • QSS Styling a QToolBox's Page.

    11
    0 Votes
    11 Posts
    13k Views
    T
    Thanks for the notice, that was why it didn't work. By make the page transparent, I mean have a hole inside the QToolBox. And actually not a "hole" like 100% transparent but I would to set the transparency. For example, if you set the stylesheet with: @QToolBox QWidget[myProperty="true"] { background-color: rgba(0, 255, 0,20); }@ You'll see some green and the transparency are here too BUT still with the gray in background. Like if there is another widget to set!
  • [Solved]Adding custom widget ( class ) into made in Qt Designer ui class

    12
    0 Votes
    12 Posts
    18k Views
    G
    Glad to hear the problem is solved. You can "close" the thread by editing your very first post and add "[Solved]" to the beginning of the subject.
  • QTabWidget Question

    4
    0 Votes
    4 Posts
    2k Views
    M
    Oh sherbert sorry - i copied and pasted my code without thinking. This was me just playing around to see if i can try and sort the problem. But i see rokemoon has helped with the size problem.. I'll try that - thanks!!
  • How to resize QMainWindow after removing all DockWidgets?

    6
    0 Votes
    6 Posts
    6k Views
    S
    Yes, you can get hold of the internal layout of the QMainWindow by calling layout() on it.
  • Can Someone Explain "this" Portion of the Qt Framework?

    9
    0 Votes
    9 Posts
    4k Views
    G
    [quote author="mehoggan" date="1313658650"]Okay thanks for the input. So this behaves "somewhat" like MFC, in the since that the message pump and the WinMain site inside a DLL. Thank you for the clarification.[/quote] yep The message pump is your qApp->exec() call.
  • ::close(fd) won't close v4l2 capture device inside QThread run(..) method

    5
    0 Votes
    5 Posts
    5k Views
    D
    Thanks again for the reply, I've moved the ::open(..)/::close(...) calls to a class outside my capture class (so doesn't inherit from Qthread) and now the close call is executing correctly. Don't really understand that but maybe I'll revisit one day! Thanks for the QImage buffer tip, I need to pick up as many of these as I can now...
  • How to make te selected columns of QTableWidget as ReadOnly

    2
    0 Votes
    2 Posts
    6k Views
    G
    You can set the items in the even columns to read only like this: @ QTableWidgetItem *twItem = tableWidget->item(3, 4); twItem->setFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable); // if you do not need selectable items this is ok: twItem->setFlags(Qt::NoItemFlags); @ Or set the flags during creation of the items, of course.
  • [SOLVED] textEdit: how to remove the margins of mainwindow

    8
    0 Votes
    8 Posts
    8k Views
    K
    i solved it with the following code. @QMainWindow::centralWidget()->layout()->setContentsMargins(0,0,0,0);@
  • How to convert whole qt gui application from portrait to landscape mode

    8
    0 Votes
    8 Posts
    5k Views
    M
    may be you can try setVerticalScrollBarPolicy() setHorizontalScrollBarPolicy().
  • How to include a .qrc in another .qrc file?

    4
    0 Votes
    4 Posts
    4k Views
    F
    Thanks, I will try that!
  • Pass a QImage to an opengl GLSL sampler

    3
    0 Votes
    3 Posts
    5k Views
    V
    I don't know if I made myself clear, but if you need further help, just ask.
  • JavaScript override

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • 32bit Integer cap on 64bit OS

    5
    0 Votes
    5 Posts
    4k Views
    P
    Kaohnig and Volker hit the nail on the head. Because npts was only an int, the computation was downcast regardless of the type I assigned to nrows. Since I can't change the type of npts (it comes from other code... I showed it adjacent for clarity in my post), I had to recast it during the nrows computation: @int npts = 71338; quint64 nrows = quint64(npts) * ( quint64(npts) - 1 ); //5089038906 as expected@ Thanks for the help! I knew it was something obvious.
  • Image Resizing in QGraphics

    4
    0 Votes
    4 Posts
    5k Views
    F
    Try QGraphisPixmapItem: "http://doc.qt.nokia.com/4.7/qgraphicspixmapitem.html#details":http://doc.qt.nokia.com/4.7/qgraphicspixmapitem.html#details The easiest way: You can set the scale of the QGraphicsView: "http://doc.qt.nokia.com/4.7/qgraphicsview.html#scale":http://doc.qt.nokia.com/4.7/qgraphicsview.html#scale The "scale" method uses two factors, one for X and another for Y. As I understand, you will always keep the Y factor as 1.0 . But before setting a new scale (a particular case of transformation), you will need to reset the previous transformation: "http://doc.qt.nokia.com/4.7/qgraphicsview.html#resetTransform":http://doc.qt.nokia.com/4.7/qtransform.html#scale A bit more complicated, as that might be a little bit more slower than really understanding the transformations and applying a calculated one, adjusted for the difference in scale, rather than reseting and setting a new one. Create a QTransform and apply to it the scale you need: "http://doc.qt.nokia.com/4.7/qtransform.html#scale":http://doc.qt.nokia.com/4.7/qtransform.html#scale Then apply it to the QGraphicsView without combining it with the previous transformation: "http://doc.qt.nokia.com/4.7/qgraphicsview.html#setTransform":http://doc.qt.nokia.com/4.7/qgraphicsview.html#setTransform Your resize event might do this: get new width; calculate the ratio between this and the first ever width; create a QTransform object and set its scale properly; apply this to the QGraphicsView using its setTransform method without combination to the previous; OR get new width; calculate the ratio between this and the last one; save width for future use; create a QTransform object and set its scale properly; apply this to the QGraphicsView using its setTransform method combining it to the previous; I have never tried to do this, but I guess that will work as expected. Hope this helps, Francisco