Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Problem with QSizeGrip under OSX
Forum Updated to NodeBB v4.3 + New Features

Problem with QSizeGrip under OSX

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 768 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #1

    I wanted to make a QRubberBand instance user resizeable after an initial selection has been made. After tinkering a bit myself with QSizeGrip myself and having no success, I asked a question over on stackoverflow. A kind person answered and then even posted a complete example project: "Implementing resize handles on QRubberband":http://stackoverflow.com/a/19067132/840992

    Part of the suggested solution:
    @Resizable_rubber_band::Resizable_rubber_band(QWidget parent) : QWidget(parent) {
    //tell QSizeGrip to resize this widget instead of top-level window
    setWindowFlags(Qt::SubWindow);
    QHBoxLayout
    layout = new QHBoxLayout(this);
    layout->setContentsMargins(0, 0, 0, 0);
    QSizeGrip* grip1 = new QSizeGrip(this);
    QSizeGrip* grip2 = new QSizeGrip(this);
    layout->addWidget(grip1, 0, Qt::AlignLeft | Qt::AlignTop);
    layout->addWidget(grip2, 0, Qt::AlignRight | Qt::AlignBottom);
    rubberband = new QRubberBand(QRubberBand::Rectangle, this);
    rubberband->move(0, 0);
    rubberband->show();
    }

    void Resizable_rubber_band::resizeEvent(QResizeEvent *) {
    rubberband->resize(size());
    }@

    The issue is that when I run it (Qt 5.1.1 on OSX) I am still not getting the resize handles. I've searched around and haven't found anything about issues or bugs with QSizeGrip on OSX so I thought I would ask here before I waste more time on this approach. Has anyone used QSizeGrip successfully under OSX? Any glaring issues with the example?

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved